Update stm32-metapac.

This commit is contained in:
Dario Nieuwenhuis 2024-09-11 01:00:23 +02:00
parent d69f68b8c0
commit c739091085
2 changed files with 11 additions and 9 deletions

View File

@ -72,7 +72,7 @@ rand_core = "0.6.3"
sdio-host = "0.5.0" sdio-host = "0.5.0"
critical-section = "1.1" critical-section = "1.1"
#stm32-metapac = { version = "15" } #stm32-metapac = { version = "15" }
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-5ef354f3e49f790e47f5c818f243459742c9b83b" } stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-ad00827345b4b758b2453082809d6e3b634b5364" }
vcell = "0.1.3" vcell = "0.1.3"
nb = "1.0.0" nb = "1.0.0"
@ -99,7 +99,7 @@ proc-macro2 = "1.0.36"
quote = "1.0.15" quote = "1.0.15"
#stm32-metapac = { version = "15", default-features = false, features = ["metadata"]} #stm32-metapac = { version = "15", default-features = false, features = ["metadata"]}
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-5ef354f3e49f790e47f5c818f243459742c9b83b", default-features = false, features = ["metadata"] } stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-ad00827345b4b758b2453082809d6e3b634b5364", default-features = false, features = ["metadata"] }
[features] [features]
default = ["rt"] default = ["rt"]

View File

@ -4,7 +4,7 @@
#![allow(missing_docs)] // TODO #![allow(missing_docs)] // TODO
#![cfg_attr(adc_f3_v2, allow(unused))] #![cfg_attr(adc_f3_v2, allow(unused))]
#[cfg(not(adc_f3_v2))] #[cfg(not(any(adc_f3_v2, adc_u5)))]
#[cfg_attr(adc_f1, path = "f1.rs")] #[cfg_attr(adc_f1, path = "f1.rs")]
#[cfg_attr(adc_f3, path = "f3.rs")] #[cfg_attr(adc_f3, path = "f3.rs")]
#[cfg_attr(adc_f3_v1_1, path = "f3_v1_1.rs")] #[cfg_attr(adc_f3_v1_1, path = "f3_v1_1.rs")]
@ -19,14 +19,16 @@ mod _version;
use core::marker::PhantomData; use core::marker::PhantomData;
#[allow(unused)] #[allow(unused)]
#[cfg(not(adc_f3_v2))] #[cfg(not(any(adc_f3_v2, adc_u5)))]
pub use _version::*; pub use _version::*;
#[cfg(any(adc_f1, adc_f3, adc_v1, adc_l0, adc_f3_v1_1))] #[cfg(any(adc_f1, adc_f3, adc_v1, adc_l0, adc_f3_v1_1))]
use embassy_sync::waitqueue::AtomicWaker; use embassy_sync::waitqueue::AtomicWaker;
#[cfg(not(any(adc_u5)))]
pub use crate::pac::adc::vals; pub use crate::pac::adc::vals;
#[cfg(not(any(adc_f1, adc_f3_v2)))] #[cfg(not(any(adc_f1, adc_f3_v2, adc_u5)))]
pub use crate::pac::adc::vals::Res as Resolution; pub use crate::pac::adc::vals::Res as Resolution;
#[cfg(not(any(adc_u5)))]
pub use crate::pac::adc::vals::SampleTime; pub use crate::pac::adc::vals::SampleTime;
use crate::peripherals; use crate::peripherals;
@ -36,7 +38,7 @@ dma_trait!(RxDma, Instance);
pub struct Adc<'d, T: Instance> { pub struct Adc<'d, T: Instance> {
#[allow(unused)] #[allow(unused)]
adc: crate::PeripheralRef<'d, T>, adc: crate::PeripheralRef<'d, T>,
#[cfg(not(any(adc_f3_v2, adc_f3_v1_1)))] #[cfg(not(any(adc_f3_v2, adc_f3_v1_1, adc_u5)))]
sample_time: SampleTime, sample_time: SampleTime,
} }
@ -57,7 +59,7 @@ impl State {
trait SealedInstance { trait SealedInstance {
#[allow(unused)] #[allow(unused)]
fn regs() -> crate::pac::adc::Adc; fn regs() -> crate::pac::adc::Adc;
#[cfg(not(any(adc_f1, adc_v1, adc_l0, adc_f3_v2, adc_f3_v1_1, adc_g0)))] #[cfg(not(any(adc_f1, adc_v1, adc_l0, adc_f3_v2, adc_f3_v1_1, adc_g0, adc_u5)))]
#[allow(unused)] #[allow(unused)]
fn common_regs() -> crate::pac::adccommon::AdcCommon; fn common_regs() -> crate::pac::adccommon::AdcCommon;
#[cfg(any(adc_f1, adc_f3, adc_v1, adc_l0, adc_f3_v1_1))] #[cfg(any(adc_f1, adc_f3, adc_v1, adc_l0, adc_f3_v1_1))]
@ -163,7 +165,7 @@ foreach_adc!(
crate::pac::$inst crate::pac::$inst
} }
#[cfg(not(any(adc_f1, adc_v1, adc_l0, adc_f3_v2, adc_f3_v1_1, adc_g0)))] #[cfg(not(any(adc_f1, adc_v1, adc_l0, adc_f3_v2, adc_f3_v1_1, adc_g0, adc_u5)))]
fn common_regs() -> crate::pac::adccommon::AdcCommon { fn common_regs() -> crate::pac::adccommon::AdcCommon {
return crate::pac::$common_inst return crate::pac::$common_inst
} }
@ -200,7 +202,7 @@ macro_rules! impl_adc_pin {
/// Get the maximum reading value for this resolution. /// Get the maximum reading value for this resolution.
/// ///
/// This is `2**n - 1`. /// This is `2**n - 1`.
#[cfg(not(any(adc_f1, adc_f3_v2)))] #[cfg(not(any(adc_f1, adc_f3_v2, adc_u5)))]
pub const fn resolution_to_max_count(res: Resolution) -> u32 { pub const fn resolution_to_max_count(res: Resolution) -> u32 {
match res { match res {
#[cfg(adc_v4)] #[cfg(adc_v4)]