We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 980b2e4 commit 0ac37daCopy full SHA for 0ac37da
src/timer.rs
@@ -100,6 +100,19 @@ macro_rules! hal {
100
}
101
102
103
+ /// Clears interrupt associated with `event`.
104
+ ///
105
+ /// If the interrupt is not cleared, it will immediately retrigger after
106
+ /// the ISR has finished.
107
+ pub fn clear_interrupt(&mut self, event: Event) {
108
+ match event {
109
+ Event::TimeOut => {
110
+ // Clear interrupt flag
111
+ self.tim.sr.write(|w| w.uif().clear_bit());
112
+ }
113
114
115
+
116
/// Stops listening for an `event`
117
pub fn unlisten(&mut self, event: Event) {
118
match event {
0 commit comments