Merge pull request #2779 from barnabywalters/patch-1

Add VBUS detection blackpill comment
This commit is contained in:
Dario Nieuwenhuis 2024-04-05 20:28:15 +00:00 committed by GitHub
commit 328cb99068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,6 +49,7 @@ async fn main(_spawner: Spawner) {
// Create the driver, from the HAL.
let mut ep_out_buffer = [0u8; 256];
let mut config = embassy_stm32::usb::Config::default();
// If the board youre using doesnt have the VBUS pin wired up correctly for detecting the USB bus voltage (e.g. on the f4 blackpill board), set this to false
config.vbus_detection = true;
let driver = Driver::new_fs(p.USB_OTG_FS, Irqs, p.PA12, p.PA11, &mut ep_out_buffer, config);