diff options
| author | xoviat <[email protected]> | 2021-04-06 14:23:13 -0500 |
|---|---|---|
| committer | xoviat <[email protected]> | 2021-04-06 14:23:13 -0500 |
| commit | 7cb46ac720a85cdf67e68730ba11130b1d02fbc6 (patch) | |
| tree | 9eb913a988c494940faeb7e1bca141c3508f156c | |
| parent | dea09876e030f97ed53d1b81a5327d98c7bcb805 (diff) | |
stm32: fix usb
| -rw-r--r-- | embassy-stm32-examples/src/bin/usb_serial.rs | 4 | ||||
| -rw-r--r-- | embassy-stm32/Cargo.toml | 2 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc.rs | 8 |
3 files changed, 7 insertions, 7 deletions
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}; | |||
| 17 | use embassy::util::Forever; | 17 | use embassy::util::Forever; |
| 18 | use embassy_extras::usb::usb_serial::UsbSerial; | 18 | use embassy_extras::usb::usb_serial::UsbSerial; |
| 19 | use embassy_extras::usb::Usb; | 19 | use embassy_extras::usb::Usb; |
| 20 | use embassy_stm32::hal::otg_fs::{UsbBus, USB}; | ||
| 21 | use embassy_stm32::hal::prelude::*; | ||
| 20 | use embassy_stm32::{interrupt, pac, rtc}; | 22 | use embassy_stm32::{interrupt, pac, rtc}; |
| 21 | use futures::future::{select, Either}; | 23 | use futures::future::{select, Either}; |
| 22 | use futures::pin_mut; | 24 | use futures::pin_mut; |
| 23 | use stm32f4xx_hal::otg_fs::{UsbBus, USB}; | ||
| 24 | use stm32f4xx_hal::prelude::*; | ||
| 25 | use usb_device::bus::UsbBusAllocator; | 25 | use usb_device::bus::UsbBusAllocator; |
| 26 | use usb_device::prelude::*; | 26 | use usb_device::prelude::*; |
| 27 | 27 | ||
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" } | |||
| 46 | embedded-dma = { version = "0.1.2" } | 46 | embedded-dma = { version = "0.1.2" } |
| 47 | bxcan = "0.5.0" | 47 | bxcan = "0.5.0" |
| 48 | nb = "*" | 48 | nb = "*" |
| 49 | stm32f4xx-hal = { version = "0.9.0", features = ["rt", "can"], optional = true } | 49 | stm32f4xx-hal = { version = "0.9.0", features = ["rt", "can", "usb_fs"], optional = true } |
| 50 | stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true } | 50 | stm32l0xx-hal = { version = "0.7.0", features = ["rt"], optional = true } |
| 51 | futures = { version = "0.3.5", default-features = false, features = ["async-await"] } \ No newline at end of file | 51 | 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 @@ | |||
| 1 | use crate::hal::bb; | ||
| 2 | use crate::hal::rcc::Clocks; | ||
| 1 | use core::cell::Cell; | 3 | use core::cell::Cell; |
| 2 | use core::convert::TryInto; | 4 | use core::convert::TryInto; |
| 3 | use core::sync::atomic::{compiler_fence, AtomicU32, Ordering}; | 5 | use core::sync::atomic::{compiler_fence, AtomicU32, Ordering}; |
| 4 | use stm32f4xx_hal::bb; | ||
| 5 | use stm32f4xx_hal::rcc::Clocks; | ||
| 6 | 6 | ||
| 7 | use embassy::interrupt::InterruptExt; | 7 | use embassy::interrupt::InterruptExt; |
| 8 | use embassy::time::{Clock, TICKS_PER_SECOND}; | 8 | use embassy::time::{Clock, TICKS_PER_SECOND}; |
| @@ -259,7 +259,7 @@ macro_rules! impl_timer { | |||
| 259 | ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 3) => { | 259 | ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 3) => { |
| 260 | mod $module { | 260 | mod $module { |
| 261 | use super::*; | 261 | use super::*; |
| 262 | use stm32f4xx_hal::pac::{$TYPE, RCC}; | 262 | use crate::hal::pac::{$TYPE, RCC}; |
| 263 | 263 | ||
| 264 | impl sealed::Sealed for $TYPE {} | 264 | impl sealed::Sealed for $TYPE {} |
| 265 | 265 | ||
| @@ -376,7 +376,7 @@ macro_rules! impl_timer { | |||
| 376 | ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 1) => { | 376 | ($module:ident: ($TYPE:ident, $INT:ident, $apbenr:ident, $enrbit:expr, $apbrstr:ident, $rstrbit:expr, $ppre:ident, $pclk: ident), 1) => { |
| 377 | mod $module { | 377 | mod $module { |
| 378 | use super::*; | 378 | use super::*; |
| 379 | use stm32f4xx_hal::pac::{$TYPE, RCC}; | 379 | use crate::hal::pac::{$TYPE, RCC}; |
| 380 | 380 | ||
| 381 | impl sealed::Sealed for $TYPE {} | 381 | impl sealed::Sealed for $TYPE {} |
| 382 | 382 | ||
