|
|
@ -75,7 +75,7 @@ volatile static bool m_drop_state_triggered = false; |
|
|
|
*******************************************************************************/ |
|
|
|
|
|
|
|
// READY_PIN 中断回调函数 |
|
|
|
//static void ads1293_ready_pin_irq(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action); |
|
|
|
// static void ads1293_ready_pin_irq(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action); |
|
|
|
// 缓冲区切换BUFFER |
|
|
|
static void prvf_buffer_switch(void); |
|
|
|
|
|
|
@ -326,7 +326,7 @@ void ads1293_sample_one_frame(); |
|
|
|
void nrfx_timer_event_handler(nrf_timer_event_t event_type, void* p_context) { // |
|
|
|
ads1293_sample_one_frame(); |
|
|
|
} |
|
|
|
//static void ads1293_ready_pin_irq(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { ads1293_sample_one_frame(); } |
|
|
|
// static void ads1293_ready_pin_irq(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { ads1293_sample_one_frame(); } |
|
|
|
static void ads1293_sample_one_frame() { |
|
|
|
if (!m_work_flag) { |
|
|
|
return; |
|
|
@ -414,7 +414,11 @@ void hwss_init(void) { |
|
|
|
if (err != NRFX_SUCCESS) { |
|
|
|
NRF_LOG_ERROR("nrfx_timer_init failed with: %d\n", err); |
|
|
|
} |
|
|
|
uint32_t timer_ticks = nrfx_timer_ms_to_ticks(&m_timer, 2); // 500HZ |
|
|
|
|
|
|
|
ZASSERT(SAMPLE_RATE == 400); |
|
|
|
uint32_t timer_ticks = nrfx_timer_ms_to_ticks(&m_timer, 5); // 200HZ |
|
|
|
ZASSERT(timer_ticks % 2 == 0); // |
|
|
|
timer_ticks = timer_ticks / 2; // 400HZ |
|
|
|
nrfx_timer_extended_compare(&m_timer, NRF_TIMER_CC_CHANNEL0, timer_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true); |
|
|
|
} |
|
|
|
|
|
|
|