summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHosted Weblate <hosted@weblate.org>2021-02-27 16:20:00 +0100
committerHosted Weblate <hosted@weblate.org>2021-02-27 16:20:00 +0100
commit19178a17676f338dc05c7edf81fef58ee4aa72b8 (patch)
tree5204f4be87faa5959283f0157125435bc31a654f
parent6c3fcead629e5fda9db987d8ea9da719c56720ba (diff)
parentf4886a6f46ba4e421b739952be968703b1e7f4b6 (diff)
Merge remote-tracking branch 'origin/main' into main
-rw-r--r--supervisor/shared/usb/tusb_config.h2
-rw-r--r--supervisor/shared/usb/usb.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/supervisor/shared/usb/tusb_config.h b/supervisor/shared/usb/tusb_config.h
index bff7bd6b5..676810119 100644
--- a/supervisor/shared/usb/tusb_config.h
+++ b/supervisor/shared/usb/tusb_config.h
@@ -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
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c
index aa35b95e6..614bf85e0 100644
--- a/supervisor/shared/usb/usb.c
+++ b/supervisor/shared/usb/usb.c
@@ -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