File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ pub trait HrTimer<TIM, PSCL>: Sized {
35
35
/// Stop timer and reset counter
36
36
fn stop_and_reset ( & mut self , _hr_control : & mut HrPwmControl ) ;
37
37
38
+ fn clear_repetition_interrupt ( & mut self ) ;
39
+
38
40
/// Make a handle to this timers reset event to use as adc trigger
39
41
fn as_reset_adc_trigger ( & self ) -> super :: adc_trigger:: TimerReset < Self > ;
40
42
@@ -105,6 +107,12 @@ macro_rules! hrtim_timer {
105
107
fn as_period_adc_trigger( & self ) -> super :: adc_trigger:: TimerPeriod <Self > {
106
108
super :: adc_trigger:: TimerPeriod ( PhantomData )
107
109
}
110
+
111
+ fn clear_repetition_interrupt( & mut self ) {
112
+ let tim = unsafe { & * $TIMX:: ptr( ) } ;
113
+
114
+ tim. $icr. write( |w| w. $repc( ) . set_bit( ) ) ;
115
+ }
108
116
}
109
117
110
118
impl <PSCL > HrTim <$TIMX, PSCL > {
@@ -120,12 +128,6 @@ macro_rules! hrtim_timer {
120
128
tim. $dier. modify( |_r, w| w. $repie( ) . bit( enable) ) ;
121
129
}
122
130
123
- pub fn clear_repetition_interrupt( & mut self ) {
124
- let tim = unsafe { & * $TIMX:: ptr( ) } ;
125
-
126
- tim. $icr. write( |w| w. $repc( ) . set_bit( ) ) ;
127
- }
128
-
129
131
pub fn capture_ch1( & mut self ) -> & mut HrCapt <$TIMX, PSCL , capture:: Ch1 > {
130
132
& mut self . capture_ch1
131
133
}
You can’t perform that action at this time.
0 commit comments