X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm32l0%2Fao_timer.c;h=89193333f5c32a138d2bd593ced54c2c04a1db1f;hb=7b1f4177d42e5e951a7db4289c847d355a785c2a;hp=d2e581469f57c20b89ac593020820bd0681e98a1;hpb=a6baf04bae3fe6a6b3da2f456419732ffeb4d056;p=fw%2Faltos diff --git a/src/stm32l0/ao_timer.c b/src/stm32l0/ao_timer.c index d2e58146..89193333 100644 --- a/src/stm32l0/ao_timer.c +++ b/src/stm32l0/ao_timer.c @@ -62,10 +62,7 @@ void stm_systick_isr(void) { if (stm_systick.csr & (1 << STM_SYSTICK_CSR_COUNTFLAG)) { ++ao_tick_count; -#if HAS_TASK_QUEUE - if (ao_task_alarm_tick && (int16_t) (ao_tick_count - ao_task_alarm_tick) >= 0) - ao_task_check_alarm((uint16_t) ao_tick_count); -#endif + ao_task_check_alarm(); #if AO_DATA_ALL if (++ao_data_count == ao_data_interval) { ao_data_count = 0; @@ -101,4 +98,10 @@ ao_timer_init(void) (STM_SYSTICK_CSR_CLKSOURCE_HCLK_8 << STM_SYSTICK_CSR_CLKSOURCE)); } +void +ao_timer_stop(void) +{ + stm_systick.csr = 0; +} + #endif