return ao_tick_count;
}
+#if 0
uint64_t
ao_time_ns(void)
{
return (uint64_t) after * (1000000000ULL / AO_HERTZ) +
(uint64_t) cvr * (1000000000ULL / AO_SYSTICK);
}
+#endif
#if AO_DATA_ALL
volatile uint8_t ao_data_interval = 1;
{
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) {
+ if (++ao_data_count == ao_data_interval && ao_data_interval) {
ao_data_count = 0;
#if HAS_ADC
#if HAS_FAKE_FLIGHT
(STM_SYSTICK_CSR_CLKSOURCE_HCLK_8 << STM_SYSTICK_CSR_CLKSOURCE));
}
+void
+ao_timer_stop(void)
+{
+ stm_systick.csr = 0;
+}
+
#endif