mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Merge pull request #1804 from embassy-rs/fix-f37x
stm32: fix f37x build.
This commit is contained in:
commit
6babd5752e
1
ci.sh
1
ci.sh
@ -81,6 +81,7 @@ cargo batch \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32l041f6,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32l151cb-a,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f398ve,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f378cc,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32g0c1ve,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f217zg,defmt,exti,time-driver-any,unstable-traits \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \
|
||||
|
@ -29,3 +29,6 @@ embedded-hal = { version = "0.2", features = ["unproven"] }
|
||||
futures = { version = "0.3.17", default-features = false, features = [ "async-await" ] }
|
||||
lora-phy = { version = "1" }
|
||||
lorawan-device = { version = "0.10.0", default-features = false, features = ["async"], optional = true }
|
||||
|
||||
[patch.crates-io]
|
||||
lora-phy = { git = "https://github.com/embassy-rs/lora-phy", rev = "1323eccc1c470d4259f95f4f315d1be830d572a3"}
|
@ -1,6 +1,6 @@
|
||||
#![macro_use]
|
||||
|
||||
#[cfg(not(adc_f3))]
|
||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
|
||||
#[cfg_attr(adc_f1, path = "f1.rs")]
|
||||
#[cfg_attr(adc_v1, path = "v1.rs")]
|
||||
#[cfg_attr(adc_v2, path = "v2.rs")]
|
||||
@ -8,16 +8,16 @@
|
||||
#[cfg_attr(adc_v4, path = "v4.rs")]
|
||||
mod _version;
|
||||
|
||||
#[cfg(not(any(adc_f1, adc_f3)))]
|
||||
#[cfg(not(any(adc_f1, adc_f3, adc_f3_v2)))]
|
||||
mod resolution;
|
||||
mod sample_time;
|
||||
|
||||
#[cfg(not(adc_f3))]
|
||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
|
||||
#[allow(unused)]
|
||||
pub use _version::*;
|
||||
#[cfg(not(any(adc_f1, adc_f3)))]
|
||||
#[cfg(not(any(adc_f1, adc_f3, adc_f3_v2)))]
|
||||
pub use resolution::Resolution;
|
||||
#[cfg(not(adc_f3))]
|
||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
|
||||
pub use sample_time::SampleTime;
|
||||
|
||||
use crate::peripherals;
|
||||
@ -25,14 +25,14 @@ use crate::peripherals;
|
||||
pub struct Adc<'d, T: Instance> {
|
||||
#[allow(unused)]
|
||||
adc: crate::PeripheralRef<'d, T>,
|
||||
#[cfg(not(adc_f3))]
|
||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
|
||||
sample_time: SampleTime,
|
||||
}
|
||||
|
||||
pub(crate) mod sealed {
|
||||
pub trait Instance {
|
||||
fn regs() -> crate::pac::adc::Adc;
|
||||
#[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
|
||||
#[cfg(not(any(adc_f1, adc_v1, adc_f3, adc_f3_v2)))]
|
||||
fn common_regs() -> crate::pac::adccommon::AdcCommon;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ foreach_peripheral!(
|
||||
fn regs() -> crate::pac::adc::Adc {
|
||||
crate::pac::$inst
|
||||
}
|
||||
#[cfg(not(any(adc_f1, adc_v1, adc_f3)))]
|
||||
#[cfg(not(any(adc_f1, adc_v1, adc_f3, adc_f3_v2)))]
|
||||
fn common_regs() -> crate::pac::adccommon::AdcCommon {
|
||||
foreach_peripheral!{
|
||||
(adccommon, $common_inst:ident) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#[cfg(not(adc_f3))]
|
||||
#[cfg(not(any(adc_f3, adc_f3_v2)))]
|
||||
macro_rules! impl_sample_time {
|
||||
($default_doc:expr, $default:ident, ($(($doc:expr, $variant:ident, $pac_variant:ident)),*)) => {
|
||||
#[doc = concat!("ADC sample time\n\nThe default setting is ", $default_doc, " ADC clock cycles.")]
|
||||
|
@ -9,7 +9,7 @@ use crate::time::Hertz;
|
||||
#[cfg_attr(rcc_f0, path = "f0.rs")]
|
||||
#[cfg_attr(any(rcc_f1, rcc_f100, rcc_f1cl), path = "f1.rs")]
|
||||
#[cfg_attr(rcc_f2, path = "f2.rs")]
|
||||
#[cfg_attr(rcc_f3, path = "f3.rs")]
|
||||
#[cfg_attr(any(rcc_f3, rcc_f3_v2), path = "f3.rs")]
|
||||
#[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")]
|
||||
#[cfg_attr(rcc_f7, path = "f7.rs")]
|
||||
#[cfg_attr(rcc_c0, path = "c0.rs")]
|
||||
|
Loading…
Reference in New Issue
Block a user