@@ -6,7 +6,7 @@ use crate::fault::{
66 FltMonitor1 , FltMonitor2 , FltMonitor3 , FltMonitor4 , FltMonitor5 , FltMonitorSys ,
77} ;
88
9- use crate :: timer;
9+ use crate :: timer:: { self , HrTimer } ;
1010use crate :: { pac, pac:: HRTIM_COMMON } ;
1111
1212use super :: { external_event:: EevInputs , fault:: FaultInputs } ;
@@ -272,16 +272,20 @@ pub struct HrPwmCtrl;
272272pub struct Foo < ' a > ( & ' a mut pac:: hrtim_master:: cr:: W ) ;
273273
274274impl < ' a > Foo < ' a > {
275- pub fn start < TIM : timer:: Instance > ( self , _t : & mut TIM ) -> Self {
275+ pub fn start < T : HrTimer > ( self , _t : & mut T ) -> Self {
276+ use crate :: timer:: Instance ;
277+
276278 let w = self . 0 ;
277- Foo ( match TIM :: TIMX {
279+ Foo ( match T :: Timer :: TIMX {
278280 timer:: Timer :: Master => w. mcen ( ) . set_bit ( ) ,
279281 timer:: Timer :: Tim ( v) => w. tcen ( v as _ ) . set_bit ( ) ,
280282 } )
281283 }
282- pub fn stop < TIM : timer:: Instance > ( self , _t : & mut TIM ) -> Self {
284+ pub fn stop < T : HrTimer > ( self , _t : & mut T ) -> Self {
285+ use crate :: timer:: Instance ;
286+
283287 let w = self . 0 ;
284- Foo ( match TIM :: TIMX {
288+ Foo ( match T :: Timer :: TIMX {
285289 timer:: Timer :: Master => w. mcen ( ) . clear_bit ( ) ,
286290 timer:: Timer :: Tim ( v) => w. tcen ( v as _ ) . clear_bit ( ) ,
287291 } )
0 commit comments