X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstm%2Fao_timer.c;h=1132f7484fb7262cfd03175d3e001a4ba6d0cd27;hb=f9e1c5949a24e27897587b0b0ca00e089f362215;hp=78228e65b72d10ad43df98e47694fc92c4b374bf;hpb=f89e7de20374141b367205aa517a08ee203bfaf3;p=fw%2Faltos diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c index 78228e65..1132f748 100644 --- a/src/stm/ao_timer.c +++ b/src/stm/ao_timer.c @@ -28,15 +28,6 @@ uint16_t ao_time(void) return v; } -static __xdata uint8_t ao_forever; - -void -ao_delay(uint16_t ticks) -{ - ao_alarm(ticks); - ao_sleep(&ao_forever); -} - #if AO_DATA_ALL volatile __data uint8_t ao_data_interval = 1; volatile __data uint8_t ao_data_count; @@ -96,7 +87,7 @@ ao_timer_init(void) stm_rcc.apb1enr |= (1 << STM_RCC_APB1ENR_TIM6EN); stm_tim6.psc = TIMER_10kHz; - stm_tim6.arr = 100; + stm_tim6.arr = 99; stm_tim6.cnt = 0; /* Enable update interrupt */