Skip to content

Commit 5c70745

Browse files
Merge #429
429: feat: adds `get_interrupt` to `Timer` r=burrbull a=claymcleod Adds the `get_interrupt` method to `Timer` (just as it already exists for `FTimer` here: https://github.com/stm32-rs/stm32f1xx-hal/blob/master/src/timer.rs#L768) Co-authored-by: Clay McLeod <Clay.McLeod@STJUDE.org>
2 parents b6c7f4c + 4b2659c commit 5c70745

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
- `Timer`: adds `get_interrupt` to `Timer`
1011
- `gpio`: port and pin generics first, then mode,
1112
`PinMode` for modes instead of pins, `HL` trait, other cleanups
1213
- `flash`: add one-cycle delay of reading `BSY` bit after setting `STRT` bit to

src/timer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,10 @@ impl<TIM: Instance> Timer<TIM> {
678678
self.tim.clear_interrupt_flag(event);
679679
}
680680

681+
pub fn get_interrupt(&mut self) -> Event {
682+
self.tim.get_interrupt_flag()
683+
}
684+
681685
/// Stops listening for an `event`
682686
pub fn unlisten(&mut self, event: Event) {
683687
self.tim.listen_interrupt(event, false);

0 commit comments

Comments
 (0)