diff options
| -rw-r--r-- | embassy-stm32/src/low_power.rs | 6 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc/low_power.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc/v2.rs | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/embassy-stm32/src/low_power.rs b/embassy-stm32/src/low_power.rs index 604bdf416..f3e4c6994 100644 --- a/embassy-stm32/src/low_power.rs +++ b/embassy-stm32/src/low_power.rs | |||
| @@ -109,10 +109,10 @@ pub enum StopMode { | |||
| 109 | Stop2, | 109 | Stop2, |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | #[cfg(stm32l5)] | 112 | #[cfg(any(stm32l4, stm32l5))] |
| 113 | use stm32_metapac::pwr::vals::Lpms; | 113 | use stm32_metapac::pwr::vals::Lpms; |
| 114 | 114 | ||
| 115 | #[cfg(stm32l5)] | 115 | #[cfg(any(stm32l4, stm32l5))] |
| 116 | impl Into<Lpms> for StopMode { | 116 | impl Into<Lpms> for StopMode { |
| 117 | fn into(self) -> Lpms { | 117 | fn into(self) -> Lpms { |
| 118 | match self { | 118 | match self { |
| @@ -181,7 +181,7 @@ impl Executor { | |||
| 181 | 181 | ||
| 182 | #[allow(unused_variables)] | 182 | #[allow(unused_variables)] |
| 183 | fn configure_stop(&mut self, stop_mode: StopMode) { | 183 | fn configure_stop(&mut self, stop_mode: StopMode) { |
| 184 | #[cfg(stm32l5)] | 184 | #[cfg(any(stm32l4, stm32l5))] |
| 185 | crate::pac::PWR.cr1().modify(|m| m.set_lpms(stop_mode.into())); | 185 | crate::pac::PWR.cr1().modify(|m| m.set_lpms(stop_mode.into())); |
| 186 | #[cfg(stm32h5)] | 186 | #[cfg(stm32h5)] |
| 187 | crate::pac::PWR.pmcr().modify(|v| { | 187 | crate::pac::PWR.pmcr().modify(|v| { |
diff --git a/embassy-stm32/src/rtc/low_power.rs b/embassy-stm32/src/rtc/low_power.rs index a4ff1acbc..6042389ac 100644 --- a/embassy-stm32/src/rtc/low_power.rs +++ b/embassy-stm32/src/rtc/low_power.rs | |||
| @@ -65,7 +65,7 @@ pub(crate) enum WakeupPrescaler { | |||
| 65 | Div16 = 16, | 65 | Div16 = 16, |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l5, stm32wb, stm32h5, stm32g0))] | 68 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0))] |
| 69 | impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { | 69 | impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { |
| 70 | fn from(val: WakeupPrescaler) -> Self { | 70 | fn from(val: WakeupPrescaler) -> Self { |
| 71 | use crate::pac::rtc::vals::Wucksel; | 71 | use crate::pac::rtc::vals::Wucksel; |
| @@ -79,7 +79,7 @@ impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { | |||
| 79 | } | 79 | } |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l5, stm32wb, stm32h5, stm32g0))] | 82 | #[cfg(any(stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0))] |
| 83 | impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler { | 83 | impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler { |
| 84 | fn from(val: crate::pac::rtc::vals::Wucksel) -> Self { | 84 | fn from(val: crate::pac::rtc::vals::Wucksel) -> Self { |
| 85 | use crate::pac::rtc::vals::Wucksel; | 85 | use crate::pac::rtc::vals::Wucksel; |
diff --git a/embassy-stm32/src/rtc/v2.rs b/embassy-stm32/src/rtc/v2.rs index cdc1cb299..5d9025bbe 100644 --- a/embassy-stm32/src/rtc/v2.rs +++ b/embassy-stm32/src/rtc/v2.rs | |||
| @@ -131,10 +131,13 @@ impl SealedInstance for crate::peripherals::RTC { | |||
| 131 | #[cfg(all(feature = "low-power", stm32f4))] | 131 | #[cfg(all(feature = "low-power", stm32f4))] |
| 132 | const EXTI_WAKEUP_LINE: usize = 22; | 132 | const EXTI_WAKEUP_LINE: usize = 22; |
| 133 | 133 | ||
| 134 | #[cfg(all(feature = "low-power", stm32l4))] | ||
| 135 | const EXTI_WAKEUP_LINE: usize = 20; | ||
| 136 | |||
| 134 | #[cfg(all(feature = "low-power", stm32l0))] | 137 | #[cfg(all(feature = "low-power", stm32l0))] |
| 135 | const EXTI_WAKEUP_LINE: usize = 20; | 138 | const EXTI_WAKEUP_LINE: usize = 20; |
| 136 | 139 | ||
| 137 | #[cfg(all(feature = "low-power", stm32f4))] | 140 | #[cfg(all(feature = "low-power", any(stm32f4, stm32l4)))] |
| 138 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; | 141 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; |
| 139 | 142 | ||
| 140 | #[cfg(all(feature = "low-power", stm32l0))] | 143 | #[cfg(all(feature = "low-power", stm32l0))] |
