mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 14:44:32 +00:00
Added vrefbuf driver.
Also updated stm32-data-generated to latest
This commit is contained in:
parent
92d12b5d88
commit
4a3cf32316
@ -81,7 +81,7 @@ futures-util = { version = "0.3.30", default-features = false }
|
|||||||
sdio-host = "0.9.0"
|
sdio-host = "0.9.0"
|
||||||
critical-section = "1.1"
|
critical-section = "1.1"
|
||||||
#stm32-metapac = { version = "16" }
|
#stm32-metapac = { version = "16" }
|
||||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-a236d845991bb48198427e08dc61ae3e257057a8" }
|
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-9941f338734a2e6c1652267f64b13f7b35d8c9db" }
|
||||||
|
|
||||||
vcell = "0.1.3"
|
vcell = "0.1.3"
|
||||||
nb = "1.0.0"
|
nb = "1.0.0"
|
||||||
@ -110,7 +110,7 @@ proc-macro2 = "1.0.36"
|
|||||||
quote = "1.0.15"
|
quote = "1.0.15"
|
||||||
|
|
||||||
#stm32-metapac = { version = "16", default-features = false, features = ["metadata"]}
|
#stm32-metapac = { version = "16", default-features = false, features = ["metadata"]}
|
||||||
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-a236d845991bb48198427e08dc61ae3e257057a8", default-features = false, features = ["metadata"] }
|
stm32-metapac = { git = "https://github.com/embassy-rs/stm32-data-generated", tag = "stm32-data-9941f338734a2e6c1652267f64b13f7b35d8c9db", default-features = false, features = ["metadata"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["rt"]
|
default = ["rt"]
|
||||||
|
@ -5,7 +5,7 @@ pub use crate::pac::rcc::vals::Otghssel;
|
|||||||
use crate::pac::rcc::vals::Pllrge;
|
use crate::pac::rcc::vals::Pllrge;
|
||||||
pub use crate::pac::rcc::vals::{
|
pub use crate::pac::rcc::vals::{
|
||||||
Hdiv5, Hpre as AHBPrescaler, Hpre5 as AHB5Prescaler, Hsepre as HsePrescaler, Plldiv as PllDiv, Pllm as PllPreDiv,
|
Hdiv5, Hpre as AHBPrescaler, Hpre5 as AHB5Prescaler, Hsepre as HsePrescaler, Plldiv as PllDiv, Pllm as PllPreDiv,
|
||||||
Plln as PllMul, Pllsrc as PllSource, Ppre as APBPrescaler, Sw as Sysclk,
|
Plln as PllMul, Pllsrc as PllSource, Ppre as APBPrescaler, Sai1sel, Sw as Sysclk,
|
||||||
};
|
};
|
||||||
#[cfg(all(peri_usb_otg_hs))]
|
#[cfg(all(peri_usb_otg_hs))]
|
||||||
pub use crate::pac::{syscfg::vals::Usbrefcksel, SYSCFG};
|
pub use crate::pac::{syscfg::vals::Usbrefcksel, SYSCFG};
|
||||||
@ -254,6 +254,16 @@ pub(crate) unsafe fn init(config: Config) {
|
|||||||
w.set_clksel(usb_refck_sel);
|
w.set_clksel(usb_refck_sel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#[cfg(sai_v4_2pdm)]
|
||||||
|
let audioclk = match config.mux.sai1sel {
|
||||||
|
Sai1sel::HSI => Some(HSI_FREQ),
|
||||||
|
Sai1sel::PLL1_Q => Some(pll1.q.expect("PLL1.Q not configured")),
|
||||||
|
Sai1sel::PLL1_P => Some(pll1.p.expect("PLL1.P not configured")),
|
||||||
|
Sai1sel::SYS => panic!("SYS not supported yet"),
|
||||||
|
Sai1sel::AUDIOCLK => panic!("AUDIOCLK not supported yet"),
|
||||||
|
_ => None,
|
||||||
|
};
|
||||||
|
|
||||||
let lsi = config.ls.lsi.then_some(LSI_FREQ);
|
let lsi = config.ls.lsi.then_some(LSI_FREQ);
|
||||||
|
|
||||||
config.mux.init();
|
config.mux.init();
|
||||||
@ -279,6 +289,8 @@ pub(crate) unsafe fn init(config: Config) {
|
|||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
lse: None,
|
lse: None,
|
||||||
|
#[cfg(sai_v4_2pdm)]
|
||||||
|
audioclk: audioclk,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user