Skip to content

Commit dbebbe9

Browse files
committed
Ability to clear timer interrupt flag
1 parent f651e6e commit dbebbe9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/timers.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ macro_rules! timers {
168168
rcc.$apbenr.modify(|_, w| w.$timXen().clear_bit());
169169
self.tim
170170
}
171+
172+
/// Clears interrupt flag
173+
pub fn clear_irq(&mut self) {
174+
self.tim.sr.modify(|_, w| w.uif().clear_bit());
175+
}
171176
}
172177

173178
impl CountDown for Timer<$TIM> {

0 commit comments

Comments
 (0)