Skip to content

Commit d8db710

Browse files
authored
Merge pull request #246 from robhany/pause_lptimer
Pause and resume LPTIMER
2 parents 6f457be + 6793b27 commit d8db710

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lptimer.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,15 @@ macro_rules! hal {
300300
pub fn get_arr(&self) -> u16 {
301301
self.lptim.arr.read().bits() as u16
302302
}
303+
304+
pub fn pause(&mut self) {
305+
self.disable();
306+
}
307+
308+
pub fn resume(&mut self) {
309+
self.enable();
310+
self.start_continuous_mode();
311+
}
303312
}
304313
};
305314
}

0 commit comments

Comments
 (0)