Skip to content

Commit f4886a6

Browse files
authored
Merge pull request #4283 from pewpew-game/usb-msc-disable
Fix for CIRCUITPY_USB_MSC=0
2 parents 888a0c5 + 8c8d60f commit f4886a6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

supervisor/shared/usb/tusb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#define CFG_TUD_CDC 1
7171
#endif
7272

73-
#define CFG_TUD_MSC 1
73+
#define CFG_TUD_MSC CIRCUITPY_USB_MSC
7474
#define CFG_TUD_HID CIRCUITPY_USB_HID
7575
#define CFG_TUD_MIDI CIRCUITPY_USB_MIDI
7676
#define CFG_TUD_VENDOR CIRCUITPY_USB_VENDOR

supervisor/shared/usb/usb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,16 @@ void usb_irq_handler(void) {
131131

132132
// Invoked when device is mounted
133133
void tud_mount_cb(void) {
134+
#if CIRCUITPY_USB_MSC
134135
usb_msc_mount();
136+
#endif
135137
}
136138

137139
// Invoked when device is unmounted
138140
void tud_umount_cb(void) {
141+
#if CIRCUITPY_USB_MSC
139142
usb_msc_umount();
143+
#endif
140144
}
141145

142146
// Invoked when usb bus is suspended

0 commit comments

Comments
 (0)