diff --git a/embassy-stm32-examples/src/bin/usb_serial.rs b/embassy-stm32-examples/src/bin/usb_serial.rs index 7e95f1221..6a1d27d54 100644 --- a/embassy-stm32-examples/src/bin/usb_serial.rs +++ b/embassy-stm32-examples/src/bin/usb_serial.rs @@ -17,11 +17,11 @@ use embassy::time::{Duration, Timer}; use embassy::util::Forever; use embassy_extras::usb::usb_serial::UsbSerial; use embassy_extras::usb::Usb; +use embassy_stm32::hal::otg_fs::{UsbBus, USB}; +use embassy_stm32::hal::prelude::*; use embassy_stm32::{interrupt, pac, rtc}; use futures::future::{select, Either}; use futures::pin_mut; -use stm32f4xx_hal::otg_fs::{UsbBus, USB}; -use stm32f4xx_hal::prelude::*; use usb_device::bus::UsbBusAllocator; use usb_device::prelude::*; diff --git a/embassy-stm32/Cargo.toml b/embassy-stm32/Cargo.toml index 6ab434d1f..523359417 100644 --- a/embassy-stm32/Cargo.toml +++ b/embassy-stm32/Cargo.toml @@ -46,6 +46,6 @@ embedded-hal = { version = "0.2.4" } embedded-dma = { version = "0.1.2" } bxcan = "0.5.0" nb = "*" -stm32f4xx-hal = { version = "0.9.0", features = ["rt", "can"], optional = true } +stm32f4xx-hal = { version = "0.9.0", features = ["rt", "can", "usb_fs"], optional = true } stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true } futures = { version = "0.3.5", default-features = false, features = ["async-await"] } \ No newline at end of file diff --git a/embassy-stm32/src/rtc.rs b/embassy-stm32/src/rtc.rs index 824a47072..b1abba325 100644 --- a/embassy-stm32/src/rtc.rs +++ b/embassy-stm32/src/rtc.rs @@ -1,8 +1,8 @@ +use crate::hal::bb; +use crate::hal::rcc::Clocks; use core::cell::Cell; use core::convert::TryInto; use core::sync::atomic::{compiler_fence, AtomicU32, Ordering}; -use stm32f4xx_hal::bb; -use stm32f4xx_hal::rcc::Clocks; use embassy::interrupt::InterruptExt; use embassy::time::{Clock, TICKS_PER_SECOND}; @@ -259,7 +259,7 @@ macro_rules! impl_timer { ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 3) => { mod $module { use super::*; - use stm32f4xx_hal::pac::{$TYPE, RCC}; + use crate::hal::pac::{$TYPE, RCC}; impl sealed::Sealed for $TYPE {} @@ -376,7 +376,7 @@ macro_rules! impl_timer { ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 1) => { mod $module { use super::*; - use stm32f4xx_hal::pac::{$TYPE, RCC}; + use crate::hal::pac::{$TYPE, RCC}; impl sealed::Sealed for $TYPE {}