File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,11 @@ macro_rules! hal {
129
129
self . lptim. cr. modify( |_, w| w. enable( ) . bit( enabled) ) ;
130
130
}
131
131
132
+ #[ inline( always) ]
133
+ fn start_continuous_mode( & mut self ) {
134
+ self . lptim. cr. modify( |_, w| w. cntstrt( ) . set_bit( ) ) ;
135
+ }
136
+
132
137
/// Consume the LPTIM and produce a LowPowerTimer that encapsulates
133
138
/// said LPTIM.
134
139
///
@@ -197,7 +202,7 @@ macro_rules! hal {
197
202
instance. enable( ) ;
198
203
199
204
// Write compare, arr, and continous mode start register _after_ enabling lptim
200
- instance. lptim . cr . modify ( |_ , w| w . cntstrt ( ) . set_bit ( ) ) ;
205
+ instance. start_continuous_mode ( ) ;
201
206
202
207
// This operation is sound as arr_value is a u16, and there are 16 writeable bits
203
208
instance
@@ -219,6 +224,7 @@ macro_rules! hal {
219
224
Event :: AutoReloadMatch => w. arrmie( ) . set_bit( ) ,
220
225
} ) ;
221
226
self . enable( ) ;
227
+ self . start_continuous_mode( ) ;
222
228
}
223
229
224
230
/// Disable interrupts for the specified event
@@ -230,6 +236,7 @@ macro_rules! hal {
230
236
Event :: AutoReloadMatch => w. arrmie( ) . clear_bit( ) ,
231
237
} ) ;
232
238
self . enable( ) ;
239
+ self . start_continuous_mode( ) ;
233
240
}
234
241
235
242
/// Check if the specified event has been triggered for this LowPowerTimer.
You can’t perform that action at this time.
0 commit comments