aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/rtc
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-08-13 16:43:23 +0000
committerGitHub <[email protected]>2024-08-13 16:43:23 +0000
commit55c01818cf7a8f46b8af5f602aeecb9ec8c3b84b (patch)
tree2c25cf665404226cf26b725529beae625de2d1fe /embassy-stm32/src/rtc
parentc0d74e153e6fa406977ccad0ca64b8c90a65d76a (diff)
parent60aa9c15a8a246d1d099beec8a1e3cbf08f52a8f (diff)
Merge pull request #3213 from embedded-rust-iml/stm32l4-low-power
Implement low-power feature for STM32L4 MCUs
Diffstat (limited to 'embassy-stm32/src/rtc')
-rw-r--r--embassy-stm32/src/rtc/low_power.rs4
-rw-r--r--embassy-stm32/src/rtc/v2.rs5
2 files changed, 6 insertions, 3 deletions
diff --git a/embassy-stm32/src/rtc/low_power.rs b/embassy-stm32/src/rtc/low_power.rs
index b9aaa63b9..875eaa639 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))]
69impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel { 69impl 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))]
83impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler { 83impl 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))]