tests/gadget0: avoid floating point division
Reviewed-by: Karl Palsson <karlp@tweak.net.au> (Changed from cast to literal int, more inline with efm32 and clearer intent)
This commit is contained in:
parent
18f4d7c1b7
commit
d44ffe8c0b
@ -33,7 +33,7 @@ void delay_setup(void)
|
||||
/* set up a microsecond free running timer for ... things... */
|
||||
rcc_periph_clock_enable(RCC_TIM6);
|
||||
/* microsecond counter */
|
||||
timer_set_prescaler(TIM6, rcc_apb1_frequency / 1e6 - 1);
|
||||
timer_set_prescaler(TIM6, rcc_apb1_frequency / 1000000 - 1);
|
||||
timer_set_period(TIM6, 0xffff);
|
||||
timer_one_shot_mode(TIM6);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user