File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use crate::{
1616 clocks:: ReferenceClock ,
1717 pac:: { self , RESETS , TIMER } ,
1818 resets:: SubsystemReset ,
19- typelevel:: Sealed ,
19+ typelevel:: Sealed , Clock ,
2020} ;
2121
2222/// Instant type used by the Timer & Alarm methods.
@@ -59,7 +59,8 @@ impl Timer {
5959 /// Make sure that clocks and watchdog are configured, so
6060 /// that timer ticks happen at a frequency of 1MHz.
6161 /// Otherwise, `Timer` won't work as expected.
62- pub fn new ( timer : TIMER , resets : & mut RESETS , _clocks : & ReferenceClock ) -> Self {
62+ pub fn new ( timer : TIMER , resets : & mut RESETS , clocks : & ReferenceClock ) -> Self {
63+ assert_eq ! ( clocks. freq( ) . to_Hz( ) , 1_000_000 ) ;
6364 timer. reset_bring_down ( resets) ;
6465 timer. reset_bring_up ( resets) ;
6566 Self { _private : ( ) }
You can’t perform that action at this time.
0 commit comments