Skip to content

Commit 42946ec

Browse files
committed
fix1
1 parent 555eb51 commit 42946ec

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/rtc.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,22 +684,34 @@ impl Rtc {
684684
self.modify(false, |regs| match event {
685685
Event::AlarmA => {
686686
exti.rtsr().modify(|_, w| w.tr17().enabled());
687+
#[cfg(not(feature = "gpio-f72x"))]
687688
exti.imr().modify(|_, w| w.mr17().set_bit());
689+
#[cfg(feature = "gpio-f72x")]
690+
exti.imr().modify(|_, w| w.im17().set_bit());
688691
regs.cr().modify(|_, w| w.alraie().set_bit());
689692
}
690693
Event::AlarmB => {
691694
exti.rtsr().modify(|_, w| w.tr17().enabled());
695+
#[cfg(not(feature = "gpio-f72x"))]
692696
exti.imr().modify(|_, w| w.mr17().set_bit());
697+
#[cfg(feature = "gpio-f72x")]
698+
exti.imr().modify(|_, w| w.im17().set_bit());
693699
regs.cr().modify(|_, w| w.alrbie().set_bit());
694700
}
695701
Event::Wakeup => {
696702
exti.rtsr().modify(|_, w| w.tr22().enabled());
703+
#[cfg(not(feature = "gpio-f72x"))]
697704
exti.imr().modify(|_, w| w.mr22().set_bit());
705+
#[cfg(feature = "gpio-f72x")]
706+
exti.imr().modify(|_, w| w.im22().set_bit());
698707
regs.cr().modify(|_, w| w.wutie().set_bit());
699708
}
700709
Event::Timestamp => {
701710
exti.rtsr().modify(|_, w| w.tr21().enabled());
711+
#[cfg(not(feature = "gpio-f72x"))]
702712
exti.imr().modify(|_, w| w.mr21().set_bit());
713+
#[cfg(feature = "gpio-f72x")]
714+
exti.imr().modify(|_, w| w.im21().set_bit());
703715
regs.cr().modify(|_, w| w.tsie().set_bit());
704716
}
705717
});
@@ -711,22 +723,34 @@ impl Rtc {
711723
self.modify(false, |regs| match event {
712724
Event::AlarmA => {
713725
regs.cr().modify(|_, w| w.alraie().clear_bit());
726+
#[cfg(not(feature = "gpio-f72x"))]
714727
exti.imr().modify(|_, w| w.mr17().clear_bit());
728+
#[cfg(feature = "gpio-f72x")]
729+
exti.imr().modify(|_, w| w.im17().clear_bit());
715730
exti.rtsr().modify(|_, w| w.tr17().disabled());
716731
}
717732
Event::AlarmB => {
718733
regs.cr().modify(|_, w| w.alrbie().clear_bit());
734+
#[cfg(not(feature = "gpio-f72x"))]
719735
exti.imr().modify(|_, w| w.mr17().clear_bit());
736+
#[cfg(feature = "gpio-f72x")]
737+
exti.imr().modify(|_, w| w.im17().clear_bit());
720738
exti.rtsr().modify(|_, w| w.tr17().disabled());
721739
}
722740
Event::Wakeup => {
723741
regs.cr().modify(|_, w| w.wutie().clear_bit());
742+
#[cfg(not(feature = "gpio-f72x"))]
724743
exti.imr().modify(|_, w| w.mr22().clear_bit());
744+
#[cfg(feature = "gpio-f72x")]
745+
exti.imr().modify(|_, w| w.im22().clear_bit());
725746
exti.rtsr().modify(|_, w| w.tr22().disabled());
726747
}
727748
Event::Timestamp => {
728749
regs.cr().modify(|_, w| w.tsie().clear_bit());
750+
#[cfg(not(feature = "gpio-f72x"))]
729751
exti.imr().modify(|_, w| w.mr21().clear_bit());
752+
#[cfg(feature = "gpio-f72x")]
753+
exti.imr().modify(|_, w| w.im21().clear_bit());
730754
exti.rtsr().modify(|_, w| w.tr21().disabled());
731755
}
732756
});

0 commit comments

Comments
 (0)