Merge pull request #4283 from pewpew-game/usb-msc-disable

Fix for CIRCUITPY_USB_MSC=0
This commit is contained in:
Dan Halbert 2021-02-27 10:19:52 -05:00 committed by GitHub
commit f4886a6f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -70,7 +70,7 @@
#define CFG_TUD_CDC 1
#endif
#define CFG_TUD_MSC 1
#define CFG_TUD_MSC CIRCUITPY_USB_MSC
#define CFG_TUD_HID CIRCUITPY_USB_HID
#define CFG_TUD_MIDI CIRCUITPY_USB_MIDI
#define CFG_TUD_VENDOR CIRCUITPY_USB_VENDOR

View File

@ -131,12 +131,16 @@ void usb_irq_handler(void) {
// Invoked when device is mounted
void tud_mount_cb(void) {
#if CIRCUITPY_USB_MSC
usb_msc_mount();
#endif
}
// Invoked when device is unmounted
void tud_umount_cb(void) {
#if CIRCUITPY_USB_MSC
usb_msc_umount();
#endif
}
// Invoked when usb bus is suspended