|
@ -13,6 +13,7 @@ |
|
|
static nrf_drv_spi_t ads129x_spi = NRF_DRV_SPI_INSTANCE(ADS1291_SPI_INSTANCE); // global |
|
|
static nrf_drv_spi_t ads129x_spi = NRF_DRV_SPI_INSTANCE(ADS1291_SPI_INSTANCE); // global |
|
|
static nrf_drv_spi_config_t ads129x_spi_config; |
|
|
static nrf_drv_spi_config_t ads129x_spi_config; |
|
|
static bool m_testmode_flag; |
|
|
static bool m_testmode_flag; |
|
|
|
|
|
static bool m_report_data_in_raw_mode_flag; |
|
|
|
|
|
|
|
|
/*********************************************************************************************************************** |
|
|
/*********************************************************************************************************************** |
|
|
* PRIVATE_FUNC * |
|
|
* PRIVATE_FUNC * |
|
@ -200,8 +201,11 @@ static void ads1291_ready_pin_irq(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t a |
|
|
|
|
|
|
|
|
// Éϱ¨ |
|
|
// Éϱ¨ |
|
|
one_frame_t frame; |
|
|
one_frame_t frame; |
|
|
|
|
|
if (m_report_data_in_raw_mode_flag) { |
|
|
|
|
|
frame.data = capture_data.ch1data; |
|
|
|
|
|
} else { |
|
|
frame.data = ecg_algo_get_report_data(); |
|
|
frame.data = ecg_algo_get_report_data(); |
|
|
// frame.data = capture_data.ch1data; |
|
|
|
|
|
|
|
|
} |
|
|
frame.leadoff = capture_data.loffstate; |
|
|
frame.leadoff = capture_data.loffstate; |
|
|
ecg_data_mgr_push_one_frame(frame); |
|
|
ecg_data_mgr_push_one_frame(frame); |
|
|
} |
|
|
} |
|
@ -348,3 +352,5 @@ void ecg_service_set_in_test_mode(bool testmode) { |
|
|
ZLOGI("ecg_service_set_in_test_mode %d", testmode); |
|
|
ZLOGI("ecg_service_set_in_test_mode %d", testmode); |
|
|
m_testmode_flag = testmode; |
|
|
m_testmode_flag = testmode; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void ecg_service_set_report_data_in_raw_mode(bool rawmode) { m_report_data_in_raw_mode_flag = rawmode; } |