aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/timer/low_level.rs
diff options
context:
space:
mode:
authorBruno Bousquet <[email protected]>2024-05-05 23:00:48 -0400
committerBruno Bousquet <[email protected]>2024-05-05 23:00:48 -0400
commit29d6fa0a4aa3203e95cf81ada366cb0ccf593af4 (patch)
tree9c94a5a69b04a099dd50449b6ab932424c146749 /embassy-stm32/src/timer/low_level.rs
parent431a60ca6384a77243d33f5b1bbef878267bea49 (diff)
add get_input_interrupt
Diffstat (limited to 'embassy-stm32/src/timer/low_level.rs')
-rw-r--r--embassy-stm32/src/timer/low_level.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs
index aa73986ea..7f533b75c 100644
--- a/embassy-stm32/src/timer/low_level.rs
+++ b/embassy-stm32/src/timer/low_level.rs
@@ -448,6 +448,11 @@ impl<'d, T: GeneralInstance4Channel> Timer<'d, T> {
448 self.regs_gp16().sr().modify(|r| r.set_ccif(channel.index(), false)); 448 self.regs_gp16().sr().modify(|r| r.set_ccif(channel.index(), false));
449 } 449 }
450 450
451 /// Get input interrupt.
452 pub fn get_input_interrupt(&self, channel: Channel) -> bool {
453 self.regs_gp16().sr().read().ccif(channel.index())
454 }
455
451 /// Enable input interrupt. 456 /// Enable input interrupt.
452 pub fn enable_input_interrupt(&self, channel: Channel, enable: bool) { 457 pub fn enable_input_interrupt(&self, channel: Channel, enable: bool) {
453 self.regs_gp16().dier().modify(|r| r.set_ccie(channel.index(), enable)); 458 self.regs_gp16().dier().modify(|r| r.set_ccie(channel.index(), enable));