Skip to content

Fix for CIRCUITPY_USB_MSC=0 #4283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion supervisor/shared/usb/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions supervisor/shared/usb/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down