|
|
@ -19,7 +19,7 @@ |
|
|
|
#include "nrf_uarte.h" |
|
|
|
#endif |
|
|
|
|
|
|
|
#if 1 |
|
|
|
#if 0 |
|
|
|
static void test_tx_timer_cb(void* p_context) { |
|
|
|
static uint32_t data; |
|
|
|
data++; |
|
|
@ -312,4 +312,92 @@ void main() { |
|
|
|
ZERROR_CHECK(app_timer_start(m_test_tx_timer, APP_TIMER_TICKS(100), NULL)); |
|
|
|
znordic_loop(); |
|
|
|
} |
|
|
|
#endif |
|
|
|
#if 1 |
|
|
|
/******************************************************************************* |
|
|
|
* 3导联-ADS1293-测试 * |
|
|
|
*******************************************************************************/ |
|
|
|
|
|
|
|
static void test_tx_timer_cb(void* p_context) { |
|
|
|
static uint32_t data; |
|
|
|
data++; |
|
|
|
ZLOGI("tim cb %d", data); |
|
|
|
// ThreeLeadECG_sdcard_connect2_ext_usb_sdcard_driver_ic_reset(); |
|
|
|
} |
|
|
|
|
|
|
|
extern uint32_t g_nrf_log_tx_pin; |
|
|
|
APP_TIMER_DEF(m_test_tx_timer); |
|
|
|
|
|
|
|
void main() { |
|
|
|
APP_SCHED_INIT(APP_TIMER_SCHED_EVENT_DATA_SIZE, 20); |
|
|
|
|
|
|
|
|
|
|
|
// ThreeLeadECG_sdcard_base_init(); |
|
|
|
znordic_init(); |
|
|
|
|
|
|
|
ThreeLeadECG_ecg_init(); |
|
|
|
|
|
|
|
NRF_LOG_INFO("compile time :%s %d", __TIME__, APP_TIMER_TICKS(100)); |
|
|
|
ZERROR_CHECK(app_timer_create(&m_test_tx_timer, APP_TIMER_MODE_REPEATED, test_tx_timer_cb)); |
|
|
|
ZERROR_CHECK(app_timer_start(m_test_tx_timer, APP_TIMER_TICKS(3000), NULL)); |
|
|
|
znordic_loop(); |
|
|
|
} |
|
|
|
#endif |
|
|
|
#if 0 |
|
|
|
/******************************************************************************* |
|
|
|
* 3导联-led测试 * |
|
|
|
*******************************************************************************/ |
|
|
|
static void test_tx_timer_cb(void* p_context) { |
|
|
|
static uint32_t data; |
|
|
|
data++; |
|
|
|
ZLOGI("test_tx_timer_cb %d", data); |
|
|
|
|
|
|
|
ThreeLeadECG_led_green_set_state(data % 2 == 0); |
|
|
|
} |
|
|
|
|
|
|
|
extern uint32_t g_nrf_log_tx_pin; |
|
|
|
APP_TIMER_DEF(m_test_tx_timer); |
|
|
|
|
|
|
|
void main() { |
|
|
|
APP_SCHED_INIT(APP_TIMER_SCHED_EVENT_DATA_SIZE, 20); |
|
|
|
znordic_init(); |
|
|
|
|
|
|
|
NRF_LOG_INFO("compile time :%s %d", __TIME__, APP_TIMER_TICKS(100)); |
|
|
|
NRF_LOG_INTERNAL_FLUSH(); |
|
|
|
|
|
|
|
ThreeLeadECG_led_init(); |
|
|
|
|
|
|
|
ZERROR_CHECK(app_timer_create(&m_test_tx_timer, APP_TIMER_MODE_REPEATED, test_tx_timer_cb)); |
|
|
|
ZERROR_CHECK(app_timer_start(m_test_tx_timer, APP_TIMER_TICKS(100), NULL)); |
|
|
|
znordic_loop(); |
|
|
|
} |
|
|
|
#endif |
|
|
|
#if 0 |
|
|
|
/******************************************************************************* |
|
|
|
* 3导联-电池电量测试 * |
|
|
|
*******************************************************************************/ |
|
|
|
static void test_tx_timer_cb(void* p_context) { |
|
|
|
static uint32_t data; |
|
|
|
data++; |
|
|
|
int16_t mv = ThreeLeadECG_battery_get_adc_val() * 1.0 / 4096 * 3.3 * 1000 / 2.0 * 3; |
|
|
|
ZLOGI("battery:%d", mv); |
|
|
|
} |
|
|
|
|
|
|
|
extern uint32_t g_nrf_log_tx_pin; |
|
|
|
APP_TIMER_DEF(m_test_tx_timer); |
|
|
|
|
|
|
|
void main() { |
|
|
|
APP_SCHED_INIT(APP_TIMER_SCHED_EVENT_DATA_SIZE, 20); |
|
|
|
znordic_init(); |
|
|
|
|
|
|
|
NRF_LOG_INFO("compile time :%s %d", __TIME__, APP_TIMER_TICKS(100)); |
|
|
|
NRF_LOG_INTERNAL_FLUSH(); |
|
|
|
|
|
|
|
ThreeLeadECG_adc_module_init(); |
|
|
|
ThreeLeadECG_battery_init(); |
|
|
|
|
|
|
|
ZERROR_CHECK(app_timer_create(&m_test_tx_timer, APP_TIMER_MODE_REPEATED, test_tx_timer_cb)); |
|
|
|
ZERROR_CHECK(app_timer_start(m_test_tx_timer, APP_TIMER_TICKS(100), NULL)); |
|
|
|
znordic_loop(); |
|
|
|
} |
|
|
|
#endif |