Update stm32-metapac.

This commit is contained in:
Dario Nieuwenhuis 2023-12-08 20:07:59 +01:00
parent 881cb16d28
commit c27459c052
6 changed files with 12 additions and 6 deletions

View File

@ -58,7 +58,7 @@ rand_core = "0.6.3"
sdio-host = "0.5.0" sdio-host = "0.5.0"
embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true } embedded-sdmmc = { git = "https://github.com/embassy-rs/embedded-sdmmc-rs", rev = "a4f293d3a6f72158385f79c98634cb8a14d0d2fc", optional = true }
critical-section = "1.1" critical-section = "1.1"
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-7117ad49c06fa00c388130a34977e029910083bd" } stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-019a5da1c47c092c199bc39a7f84fb444f2adcdf" }
vcell = "0.1.3" vcell = "0.1.3"
bxcan = "0.7.0" bxcan = "0.7.0"
nb = "1.0.0" nb = "1.0.0"
@ -76,7 +76,7 @@ critical-section = { version = "1.1", features = ["std"] }
[build-dependencies] [build-dependencies]
proc-macro2 = "1.0.36" proc-macro2 = "1.0.36"
quote = "1.0.15" quote = "1.0.15"
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-7117ad49c06fa00c388130a34977e029910083bd", default-features = false, features = ["metadata"]} stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-019a5da1c47c092c199bc39a7f84fb444f2adcdf", default-features = false, features = ["metadata"]}
[features] [features]

View File

@ -930,6 +930,10 @@ fn main() {
} else if pin.signal.starts_with("INN") { } else if pin.signal.starts_with("INN") {
// TODO handle in the future when embassy supports differential measurements // TODO handle in the future when embassy supports differential measurements
None None
} else if pin.signal.starts_with("IN") && pin.signal.ends_with("b") {
// we number STM32L1 ADC bank 1 as 0..=31, bank 2 as 32..=63
let signal = pin.signal.strip_prefix("IN").unwrap().strip_suffix("b").unwrap();
Some(32u8 + signal.parse::<u8>().unwrap())
} else if pin.signal.starts_with("IN") { } else if pin.signal.starts_with("IN") {
Some(pin.signal.strip_prefix("IN").unwrap().parse().unwrap()) Some(pin.signal.strip_prefix("IN").unwrap().parse().unwrap())
} else { } else {

View File

@ -148,7 +148,7 @@ impl<'d, T: Instance> Adc<'d, T> {
reg.set_cont(false); reg.set_cont(false);
reg.set_exttrig(true); reg.set_exttrig(true);
reg.set_swstart(false); reg.set_swstart(false);
reg.set_extsel(crate::pac::adc::vals::Extsel::SWSTART); reg.set_extsel(7); // SWSTART
}); });
// Configure the channel to sample // Configure the channel to sample

View File

@ -1,6 +1,6 @@
#![macro_use] #![macro_use]
#[cfg_attr(can_bxcan, path = "bxcan.rs")] #[cfg_attr(can_bxcan, path = "bxcan.rs")]
#[cfg_attr(can_fdcan, path = "fdcan.rs")] #[cfg_attr(any(can_fdcan_v1, can_fdcan_h7), path = "fdcan.rs")]
mod _version; mod _version;
pub use _version::*; pub use _version::*;

View File

@ -315,6 +315,8 @@ pub(crate) unsafe fn init(config: Config) {
adc: adc12_ck, adc: adc12_ck,
adc34: adc345_ck, adc34: adc345_ck,
pll1_p: None, pll1_p: None,
pll1_q: None, // TODO
hse: None, // TODO
rtc, rtc,
}); });
} }

View File

@ -119,7 +119,7 @@ pub struct Clocks {
#[cfg(any(stm32g4, rcc_l4))] #[cfg(any(stm32g4, rcc_l4))]
pub pll1_p: Option<Hertz>, pub pll1_p: Option<Hertz>,
#[cfg(any(stm32h5, stm32h7, rcc_f2, rcc_f4, rcc_f410, rcc_f7, rcc_l4))] #[cfg(any(stm32h5, stm32h7, stm32f2, stm32f4, stm32f7, rcc_l4, stm32g4))]
pub pll1_q: Option<Hertz>, pub pll1_q: Option<Hertz>,
#[cfg(any(stm32h5, stm32h7))] #[cfg(any(stm32h5, stm32h7))]
pub pll2_p: Option<Hertz>, pub pll2_p: Option<Hertz>,
@ -167,7 +167,7 @@ pub struct Clocks {
#[cfg(any(stm32h5, stm32h7, rcc_l4, rcc_c0))] #[cfg(any(stm32h5, stm32h7, rcc_l4, rcc_c0))]
pub lse: Option<Hertz>, pub lse: Option<Hertz>,
#[cfg(any(stm32h5, stm32h7))] #[cfg(any(stm32h5, stm32h7, stm32g4))]
pub hse: Option<Hertz>, pub hse: Option<Hertz>,
#[cfg(stm32h5)] #[cfg(stm32h5)]