Add VBUS detection blackpill comment

This commit is contained in:
Barnaby Walters 2024-04-05 22:11:01 +02:00 committed by GitHub
parent 9884460787
commit 99ea564f1c
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);