diff options
| -rw-r--r-- | examples/stm32f4/src/bin/usb_hid_keyboard.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/stm32f4/src/bin/usb_hid_keyboard.rs b/examples/stm32f4/src/bin/usb_hid_keyboard.rs index a799b4e72..d6e0be5ea 100644 --- a/examples/stm32f4/src/bin/usb_hid_keyboard.rs +++ b/examples/stm32f4/src/bin/usb_hid_keyboard.rs | |||
| @@ -49,6 +49,7 @@ async fn main(_spawner: Spawner) { | |||
| 49 | // Create the driver, from the HAL. | 49 | // Create the driver, from the HAL. |
| 50 | let mut ep_out_buffer = [0u8; 256]; | 50 | let mut ep_out_buffer = [0u8; 256]; |
| 51 | let mut config = embassy_stm32::usb::Config::default(); | 51 | let mut config = embassy_stm32::usb::Config::default(); |
| 52 | // If the board you’re using doesn’t have the VBUS pin wired up correctly for detecting the USB bus voltage (e.g. on the f4 blackpill board), set this to false | ||
| 52 | config.vbus_detection = true; | 53 | config.vbus_detection = true; |
| 53 | let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); | 54 | let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config); |
| 54 | 55 | ||
