diff options
| -rw-r--r-- | embassy-stm32/src/usb/usb.rs | 6 | ||||
| -rw-r--r-- | examples/stm32l1/Cargo.toml | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 04b1b35e8..364076739 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs | |||
| @@ -286,7 +286,10 @@ impl<'d, T: Instance> Driver<'d, T> { | |||
| 286 | #[cfg(not(usb_v4))] | 286 | #[cfg(not(usb_v4))] |
| 287 | regs.btable().write(|w| w.set_btable(0)); | 287 | regs.btable().write(|w| w.set_btable(0)); |
| 288 | 288 | ||
| 289 | #[cfg(not(stm32l1))] | ||
| 289 | dp.set_as_af(dp.af_num(), AFType::OutputPushPull); | 290 | dp.set_as_af(dp.af_num(), AFType::OutputPushPull); |
| 291 | |||
| 292 | #[cfg(not(stm32l1))] | ||
| 290 | dm.set_as_af(dm.af_num(), AFType::OutputPushPull); | 293 | dm.set_as_af(dm.af_num(), AFType::OutputPushPull); |
| 291 | 294 | ||
| 292 | // Initialize the bus so that it signals that power is available | 295 | // Initialize the bus so that it signals that power is available |
| @@ -444,6 +447,9 @@ impl<'d, T: Instance> driver::Driver<'d> for Driver<'d, T> { | |||
| 444 | #[cfg(any(usb_v3, usb_v4))] | 447 | #[cfg(any(usb_v3, usb_v4))] |
| 445 | regs.bcdr().write(|w| w.set_dppu(true)); | 448 | regs.bcdr().write(|w| w.set_dppu(true)); |
| 446 | 449 | ||
| 450 | #[cfg(stm32l1)] | ||
| 451 | crate::pac::SYSCFG.pmc().modify(|w| w.set_usb_pu(true)); | ||
| 452 | |||
| 447 | trace!("enabled"); | 453 | trace!("enabled"); |
| 448 | 454 | ||
| 449 | let mut ep_types = [EpType::BULK; EP_COUNT - 1]; | 455 | let mut ep_types = [EpType::BULK; EP_COUNT - 1]; |
diff --git a/examples/stm32l1/Cargo.toml b/examples/stm32l1/Cargo.toml index c0b35b716..322c41262 100644 --- a/examples/stm32l1/Cargo.toml +++ b/examples/stm32l1/Cargo.toml | |||
| @@ -9,6 +9,7 @@ embassy-sync = { version = "0.5.0", path = "../../embassy-sync", features = ["de | |||
| 9 | embassy-executor = { version = "0.5.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } | 9 | embassy-executor = { version = "0.5.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "defmt", "integrated-timers"] } |
| 10 | embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 10 | embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } | 11 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = [ "defmt", "stm32l151cb-a", "time-driver-any", "memory-x"] } |
| 12 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | ||
| 12 | 13 | ||
| 13 | defmt = "0.3" | 14 | defmt = "0.3" |
| 14 | defmt-rtt = "0.4" | 15 | defmt-rtt = "0.4" |
