Guest User

Untitled

a guest
Jul 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. extern crate stm32f4;
  2. use stm32f4::stm32f407;
  3.  
  4. // works
  5. fn timer_val(peripherals: &stm32f407::Peripherals) -> u16 {
  6. let timer = &peripherals.TIM6;
  7. timer.cnt.read().cnt().bits()
  8. }
  9.  
  10. // compile error "type error"
  11. fn timer_val(peripherals: &stm32f407::Peripherals.TIM6) -> u16 {
  12. timer.cnt.read().cnt().bits()
  13. }
Add Comment
Please, Sign In to add comment