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

@ -72,7 +72,7 @@ fn main() -> ! {
interrupt::OC0,
);
let mut second_timer =
CountDownTimer::tim1(&mut dp.SYSCONFIG, get_sys_clock().unwrap(), dp.TIM1);
CountDownTimer::new(&mut dp.SYSCONFIG, get_sys_clock().unwrap(), dp.TIM1);
second_timer.listen(
Event::TimeOut,
&mut dp.SYSCONFIG,