diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-05-08 21:37:37 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-05-08 21:37:37 +0200 |
| commit | 96d0eb94767cea6fbecc0c87d43a30d5b6d7e8e5 (patch) | |
| tree | fead03edcd5064d4a478eea9a2c62383bda3e03b | |
| parent | a4bf190f2f0ce28a298626de6de1c8059269cedc (diff) | |
stm32: Fix stm32f107 build.
| -rwxr-xr-x | ci.sh | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/exti.rs | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/rcc/mod.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/src/usb_otg.rs | 4 |
4 files changed, 6 insertions, 5 deletions
| @@ -58,6 +58,7 @@ cargo batch \ | |||
| 58 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \ | 58 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features nightly,stm32l552ze,defmt,exti,time-driver-any,unstable-traits \ |
| 59 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,unstable-traits \ | 59 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features nightly,stm32wl54jc-cm0p,defmt,exti,time-driver-any,unstable-traits \ |
| 60 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,unstable-traits \ | 60 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features nightly,stm32wle5ub,defmt,exti,time-driver-any,unstable-traits \ |
| 61 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7m-none-eabi --features nightly,stm32f107vc,defmt,exti,time-driver-any,unstable-traits \ | ||
| 61 | --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \ | 62 | --- build --release --manifest-path embassy-boot/nrf/Cargo.toml --target thumbv7em-none-eabi --features embassy-nrf/nrf52840 \ |
| 62 | --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \ | 63 | --- build --release --manifest-path embassy-boot/stm32/Cargo.toml --target thumbv7em-none-eabi --features embassy-stm32/stm32wl55jc-cm4 \ |
| 63 | --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ | 64 | --- build --release --manifest-path docs/modules/ROOT/examples/basic/Cargo.toml --target thumbv7em-none-eabi \ |
diff --git a/embassy-stm32/src/exti.rs b/embassy-stm32/src/exti.rs index 957a1ca55..d065a5557 100644 --- a/embassy-stm32/src/exti.rs +++ b/embassy-stm32/src/exti.rs | |||
| @@ -371,7 +371,7 @@ pub(crate) unsafe fn init() { | |||
| 371 | 371 | ||
| 372 | foreach_exti_irq!(enable_irq); | 372 | foreach_exti_irq!(enable_irq); |
| 373 | 373 | ||
| 374 | #[cfg(not(any(rcc_wb, rcc_wl5, rcc_wle, rcc_f1)))] | 374 | #[cfg(not(any(rcc_wb, rcc_wl5, rcc_wle, stm32f1)))] |
| 375 | <crate::peripherals::SYSCFG as crate::rcc::sealed::RccPeripheral>::enable(); | 375 | <crate::peripherals::SYSCFG as crate::rcc::sealed::RccPeripheral>::enable(); |
| 376 | #[cfg(stm32f1)] | 376 | #[cfg(stm32f1)] |
| 377 | <crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable(); | 377 | <crate::peripherals::AFIO as crate::rcc::sealed::RccPeripheral>::enable(); |
diff --git a/embassy-stm32/src/rcc/mod.rs b/embassy-stm32/src/rcc/mod.rs index d3710b8c3..959e59265 100644 --- a/embassy-stm32/src/rcc/mod.rs +++ b/embassy-stm32/src/rcc/mod.rs | |||
| @@ -4,7 +4,7 @@ use crate::time::Hertz; | |||
| 4 | use core::mem::MaybeUninit; | 4 | use core::mem::MaybeUninit; |
| 5 | 5 | ||
| 6 | #[cfg_attr(rcc_f0, path = "f0.rs")] | 6 | #[cfg_attr(rcc_f0, path = "f0.rs")] |
| 7 | #[cfg_attr(rcc_f1, path = "f1.rs")] | 7 | #[cfg_attr(any(rcc_f1, rcc_f1cl), path = "f1.rs")] |
| 8 | #[cfg_attr(rcc_f2, path = "f2.rs")] | 8 | #[cfg_attr(rcc_f2, path = "f2.rs")] |
| 9 | #[cfg_attr(rcc_f3, path = "f3.rs")] | 9 | #[cfg_attr(rcc_f3, path = "f3.rs")] |
| 10 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] | 10 | #[cfg_attr(any(rcc_f4, rcc_f410), path = "f4.rs")] |
| @@ -56,7 +56,7 @@ pub struct Clocks { | |||
| 56 | #[cfg(any(rcc_f2, rcc_f4, rcc_f410, rcc_f7))] | 56 | #[cfg(any(rcc_f2, rcc_f4, rcc_f410, rcc_f7))] |
| 57 | pub pll48: Option<Hertz>, | 57 | pub pll48: Option<Hertz>, |
| 58 | 58 | ||
| 59 | #[cfg(rcc_f1)] | 59 | #[cfg(stm32f1)] |
| 60 | pub adc: Hertz, | 60 | pub adc: Hertz, |
| 61 | 61 | ||
| 62 | #[cfg(any(rcc_h7, rcc_h7ab))] | 62 | #[cfg(any(rcc_h7, rcc_h7ab))] |
diff --git a/embassy-stm32/src/usb_otg.rs b/embassy-stm32/src/usb_otg.rs index 21b890d7c..c3cd776ca 100644 --- a/embassy-stm32/src/usb_otg.rs +++ b/embassy-stm32/src/usb_otg.rs | |||
| @@ -3,7 +3,6 @@ use embassy::util::Unborrow; | |||
| 3 | use embassy_hal_common::unborrow; | 3 | use embassy_hal_common::unborrow; |
| 4 | 4 | ||
| 5 | use crate::gpio::sealed::AFType; | 5 | use crate::gpio::sealed::AFType; |
| 6 | use crate::gpio::Speed; | ||
| 7 | use crate::{peripherals, rcc::RccPeripheral}; | 6 | use crate::{peripherals, rcc::RccPeripheral}; |
| 8 | 7 | ||
| 9 | macro_rules! config_ulpi_pins { | 8 | macro_rules! config_ulpi_pins { |
| @@ -13,7 +12,8 @@ macro_rules! config_ulpi_pins { | |||
| 13 | critical_section::with(|_| unsafe { | 12 | critical_section::with(|_| unsafe { |
| 14 | $( | 13 | $( |
| 15 | $pin.set_as_af($pin.af_num(), AFType::OutputPushPull); | 14 | $pin.set_as_af($pin.af_num(), AFType::OutputPushPull); |
| 16 | $pin.set_speed(Speed::VeryHigh); | 15 | #[cfg(gpio_v2)] |
| 16 | $pin.set_speed(crate::gpio::Speed::VeryHigh); | ||
| 17 | )* | 17 | )* |
| 18 | }) | 18 | }) |
| 19 | }; | 19 | }; |
