Timer API now macroless

- Separation of TIM reg and TIM pin IF
- Improvements of API
This commit is contained in:
2021-12-05 22:57:54 +01:00
parent dd7d29ec72
commit 779d5a94ec
8 changed files with 320 additions and 271 deletions

View File

@ -163,7 +163,7 @@ fn main() -> ! {
delay.delay_ms(500);
}
let mut delay_timer = CountDownTimer::tim1(&mut dp.SYSCONFIG, 50.mhz().into(), dp.TIM1);
let mut delay_timer = CountDownTimer::new(&mut dp.SYSCONFIG, 50.mhz().into(), dp.TIM1);
let mut pa0 = pinsa.pa0.into_push_pull_output();
for _ in 0..5 {
led1.toggle().ok();