diff options
| author | Barnaby Walters <[email protected]> | 2024-04-05 22:11:01 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-05 22:11:01 +0200 |
| commit | 99ea564f1c5cc3dcce908cb853f528a52cca8ae8 (patch) | |
| tree | 42cf00ccf22ec3053501511d9a0a3aa97c28c335 /examples | |
| parent | 98844607875db5789a7556c699b7657647c98ee8 (diff) | |
Add VBUS detection blackpill comment
Diffstat (limited to 'examples')
| -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 | ||
