Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extern crate stm32f4;
- use stm32f4::stm32f407;
- // works
- fn timer_val(peripherals: &stm32f407::Peripherals) -> u16 {
- let timer = &peripherals.TIM6;
- timer.cnt.read().cnt().bits()
- }
- // compile error "type error"
- fn timer_val(peripherals: &stm32f407::Peripherals.TIM6) -> u16 {
- timer.cnt.read().cnt().bits()
- }
Add Comment
Please, Sign In to add comment