X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fsamd21%2Fao_timer.c;h=2b431d38ada440fa3581d8e46b3237158b69a2b7;hb=5ca0ed94f30943952b9c63ee558733d37c896b5f;hp=0eb0dbeacc40c48b8977e4e4ea4c1ab7f243b4fa;hpb=c59892cd337162c63e5d7ba8e8eec779d201022d;p=fw%2Faltos diff --git a/src/samd21/ao_timer.c b/src/samd21/ao_timer.c index 0eb0dbea..2b431d38 100644 --- a/src/samd21/ao_timer.c +++ b/src/samd21/ao_timer.c @@ -53,6 +53,21 @@ void samd21_systick_isr(void) ao_arch_release_interrupts(); if (samd21_systick.csr & (1 << SAMD21_SYSTICK_CSR_COUNTFLAG)) { ++ao_tick_count; + ao_task_check_alarm(); +#if AO_DATA_ALL + if (++ao_data_count == ao_data_interval && ao_data_interval) { + ao_data_count = 0; +#if HAS_FAKE_FLIGHT + if (ao_fake_flight_active) + ao_fake_flight_poll(); + else +#endif + ao_adc_poll(); +#if (AO_DATA_ALL & ~(AO_DATA_ADC)) + ao_wakeup((void *) &ao_data_count); +#endif + } +#endif #ifdef AO_TIMER_HOOK AO_TIMER_HOOK; #endif