diff options
| author | Christian Enderle <[email protected]> | 2024-11-21 19:44:01 +0100 |
|---|---|---|
| committer | Christian Enderle <[email protected]> | 2024-11-22 10:37:12 +0100 |
| commit | 29934237a5d6fa783a3f7a83ab569c8aef9b95fe (patch) | |
| tree | 637384e62247d7f6d8ffc5d49654a9f4c6bb8d3a /embassy-stm32/src/rtc | |
| parent | 48fd80919a3248e8e6ce5f188cd0364f9fb3dc85 (diff) | |
rtc: reorganize low-power SealedInstance
Diffstat (limited to 'embassy-stm32/src/rtc')
| -rw-r--r-- | embassy-stm32/src/rtc/v3.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/embassy-stm32/src/rtc/v3.rs b/embassy-stm32/src/rtc/v3.rs index 12cb10bc7..a15d6ddc8 100644 --- a/embassy-stm32/src/rtc/v3.rs +++ b/embassy-stm32/src/rtc/v3.rs | |||
| @@ -133,14 +133,20 @@ impl SealedInstance for crate::peripherals::RTC { | |||
| 133 | cfg_if::cfg_if!( | 133 | cfg_if::cfg_if!( |
| 134 | if #[cfg(stm32g4)] { | 134 | if #[cfg(stm32g4)] { |
| 135 | const EXTI_WAKEUP_LINE: usize = 20; | 135 | const EXTI_WAKEUP_LINE: usize = 20; |
| 136 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; | ||
| 137 | } else if #[cfg(stm32g0)] { | 136 | } else if #[cfg(stm32g0)] { |
| 138 | const EXTI_WAKEUP_LINE: usize = 19; | 137 | const EXTI_WAKEUP_LINE: usize = 19; |
| 139 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_TAMP; | ||
| 140 | } else if #[cfg(any(stm32l5, stm32h5))] { | 138 | } else if #[cfg(any(stm32l5, stm32h5))] { |
| 141 | const EXTI_WAKEUP_LINE: usize = 17; | 139 | const EXTI_WAKEUP_LINE: usize = 17; |
| 142 | type WakeupInterrupt = crate::interrupt::typelevel::RTC; | 140 | } |
| 143 | } else if #[cfg(stm32u5)] { | 141 | ); |
| 142 | |||
| 143 | #[cfg(feature = "low-power")] | ||
| 144 | cfg_if::cfg_if!( | ||
| 145 | if #[cfg(stm32g4)] { | ||
| 146 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; | ||
| 147 | } else if #[cfg(any(stm32g0))] { | ||
| 148 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_TAMP; | ||
| 149 | } else if #[cfg(any(stm32l5, stm32h5, stm32u5))] { | ||
| 144 | type WakeupInterrupt = crate::interrupt::typelevel::RTC; | 150 | type WakeupInterrupt = crate::interrupt::typelevel::RTC; |
| 145 | } | 151 | } |
| 146 | ); | 152 | ); |
