diff options
| author | Gerzain Mata <[email protected]> | 2025-08-10 01:58:48 -0700 |
|---|---|---|
| committer | Gerzain Mata <[email protected]> | 2025-08-10 02:21:03 -0700 |
| commit | 92d12b5d8896d9bfa2789c1d5c157e1fa96e617b (patch) | |
| tree | 987b59051e3ee3abf13394bffabd1169a9b38bdf | |
| parent | 556ae0106bba66e49f62f45aa3cc458e31094dc7 (diff) | |
Updated stm32-metapac
| -rw-r--r-- | embassy-stm32/Cargo.toml | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/vrefbuf/mod.rs | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 590216c21..c4322b9ba 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml | |||
| @@ -81,7 +81,7 @@ futures-util = { version = "0.3.30", default-features = false } | |||
| 81 | sdio-host = "0.9.0" | 81 | sdio-host = "0.9.0" |
| 82 | critical-section = "1.1" | 82 | critical-section = "1.1" |
| 83 | #stm32-metapac = { version = "16" } | 83 | #stm32-metapac = { version = "16" } |
| 84 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-f0ef9106642ed869e7cfbf82d891d364c98ebb43" } | 84 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-a236d845991bb48198427e08dc61ae3e257057a8" } |
| 85 | 85 | ||
| 86 | vcell = "0.1.3" | 86 | vcell = "0.1.3" |
| 87 | nb = "1.0.0" | 87 | nb = "1.0.0" |
| @@ -110,7 +110,7 @@ proc-macro2 = "1.0.36" | |||
| 110 | quote = "1.0.15" | 110 | quote = "1.0.15" |
| 111 | 111 | ||
| 112 | #stm32-metapac = { version = "16", default-features = false, features = ["metadata"]} | 112 | #stm32-metapac = { version = "16", default-features = false, features = ["metadata"]} |
| 113 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-f0ef9106642ed869e7cfbf82d891d364c98ebb43", default-features = false, features = ["metadata"] } | 113 | stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-a236d845991bb48198427e08dc61ae3e257057a8", default-features = false, features = ["metadata"] } |
| 114 | 114 | ||
| 115 | [features] | 115 | [features] |
| 116 | default = ["rt"] | 116 | default = ["rt"] |
diff --git a/embassy-stm32/src/vrefbuf/mod.rs b/embassy-stm32/src/vrefbuf/mod.rs index 2546ccfed..f614fcf99 100644 --- a/embassy-stm32/src/vrefbuf/mod.rs +++ b/embassy-stm32/src/vrefbuf/mod.rs | |||
| @@ -5,7 +5,6 @@ use core::marker::PhantomData; | |||
| 5 | use embassy_hal_internal::PeripheralType; | 5 | use embassy_hal_internal::PeripheralType; |
| 6 | use stm32_metapac::vrefbuf::vals::*; | 6 | use stm32_metapac::vrefbuf::vals::*; |
| 7 | 7 | ||
| 8 | use crate::pac::RCC; | ||
| 9 | use crate::Peri; | 8 | use crate::Peri; |
| 10 | 9 | ||
| 11 | /// Voltage Reference (VREFBUF) driver. | 10 | /// Voltage Reference (VREFBUF) driver. |
| @@ -20,14 +19,17 @@ impl<'d, T: Instance> VoltageReferenceBuffer<'d, T> { | |||
| 20 | pub fn new(_instance: Peri<'d, T>, voltage_scale: Vrs, impedance_mode: Hiz) -> Self { | 19 | pub fn new(_instance: Peri<'d, T>, voltage_scale: Vrs, impedance_mode: Hiz) -> Self { |
| 21 | #[cfg(rcc_wba)] | 20 | #[cfg(rcc_wba)] |
| 22 | { | 21 | { |
| 22 | use crate::pac::RCC; | ||
| 23 | RCC.apb7enr().modify(|w| w.set_vrefen(true)); | 23 | RCC.apb7enr().modify(|w| w.set_vrefen(true)); |
| 24 | } | 24 | } |
| 25 | #[cfg(any(rcc_u5, rcc_h50, rcc_h5))] | 25 | #[cfg(any(rcc_u5, rcc_h50, rcc_h5))] |
| 26 | { | 26 | { |
| 27 | use crate::pac::RCC; | ||
| 27 | RCC.apb3enr().modify(|w| w.set_vrefen(true)); | 28 | RCC.apb3enr().modify(|w| w.set_vrefen(true)); |
| 28 | } | 29 | } |
| 29 | #[cfg(any(rcc_h7rs, rcc_h7rm0433, rcc_h7ab, rcc_h7))] | 30 | #[cfg(any(rcc_h7rs, rcc_h7rm0433, rcc_h7ab, rcc_h7))] |
| 30 | { | 31 | { |
| 32 | use crate::pac::RCC; | ||
| 31 | RCC.apb4enr().modify(|w| w.set_vrefen(true)); | 33 | RCC.apb4enr().modify(|w| w.set_vrefen(true)); |
| 32 | } | 34 | } |
| 33 | let vrefbuf = T::regs(); | 35 | let vrefbuf = T::regs(); |
