diff options
| author | Christian Enderle <[email protected]> | 2024-11-21 19:49:32 +0100 |
|---|---|---|
| committer | Christian Enderle <[email protected]> | 2024-11-22 10:37:12 +0100 |
| commit | 1fbb419f72a2663b472f31ae1e172bec0e4e6d1a (patch) | |
| tree | 91627d03c3953eccd533ee05d104be70dc1cde98 /embassy-stm32/src/rtc | |
| parent | a49289ce7be3e0d213d26acc1055c37bcb98f4ba (diff) | |
low-power: add support for stop for stm32u0
Diffstat (limited to 'embassy-stm32/src/rtc')
| -rw-r--r-- | embassy-stm32/src/rtc/low_power.rs | 8 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc/v3.rs | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/embassy-stm32/src/rtc/low_power.rs b/embassy-stm32/src/rtc/low_power.rs index 5bf8742de..cf7c4bb28 100644 --- a/embassy-stm32/src/rtc/low_power.rs +++ b/embassy-stm32/src/rtc/low_power.rs | |||
| @@ -65,7 +65,9 @@ pub(crate) enum WakeupPrescaler { | |||
| 65 | Div16 = 16, | 65 | Div16 = 16, |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0))] | 68 | #[cfg(any( |
| 69 | stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0 | ||
| 70 | ))] | ||
| 69 | impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { | 71 | impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { |
| 70 | fn from(val: WakeupPrescaler) -> Self { | 72 | fn from(val: WakeupPrescaler) -> Self { |
| 71 | use crate::pac::rtc::vals::Wucksel; | 73 | use crate::pac::rtc::vals::Wucksel; |
| @@ -79,7 +81,9 @@ impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { | |||
| 79 | } | 81 | } |
| 80 | } | 82 | } |
| 81 | 83 | ||
| 82 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0))] | 84 | #[cfg(any( |
| 85 | stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0 | ||
| 86 | ))] | ||
| 83 | impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler { | 87 | impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler { |
| 84 | fn from(val: crate::pac::rtc::vals::Wucksel) -> Self { | 88 | fn from(val: crate::pac::rtc::vals::Wucksel) -> Self { |
| 85 | use crate::pac::rtc::vals::Wucksel; | 89 | use crate::pac::rtc::vals::Wucksel; |
diff --git a/embassy-stm32/src/rtc/v3.rs b/embassy-stm32/src/rtc/v3.rs index d543955a4..de2c202bc 100644 --- a/embassy-stm32/src/rtc/v3.rs +++ b/embassy-stm32/src/rtc/v3.rs | |||
| @@ -139,7 +139,7 @@ impl SealedInstance for crate::peripherals::RTC { | |||
| 139 | const EXTI_WAKEUP_LINE: usize = 17; | 139 | const EXTI_WAKEUP_LINE: usize = 17; |
| 140 | } | 140 | } |
| 141 | ); | 141 | ); |
| 142 | 142 | ||
| 143 | #[cfg(feature = "low-power")] | 143 | #[cfg(feature = "low-power")] |
| 144 | cfg_if::cfg_if!( | 144 | cfg_if::cfg_if!( |
| 145 | if #[cfg(stm32g4)] { | 145 | if #[cfg(stm32g4)] { |
