From 65c22aa4347abc145493f44a4bc8d91a4f200860 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 28 Jul 2020 17:52:56 -0400 Subject: storage.erase_filesystem(): unmount and wait 1 second before resetting --- supervisor/shared/usb/usb.c | 4 ++++ supervisor/usb.h | 1 + 2 files changed, 5 insertions(+) (limited to 'supervisor') diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index edf810118..3282bd22b 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -73,6 +73,10 @@ void usb_init(void) { #endif } +void usb_disconnect(void) { + tud_disconnect(); +} + void usb_background(void) { if (usb_enabled()) { #if CFG_TUSB_OS == OPT_OS_NONE diff --git a/supervisor/usb.h b/supervisor/usb.h index 29280c725..fb8d5b45f 100644 --- a/supervisor/usb.h +++ b/supervisor/usb.h @@ -40,6 +40,7 @@ void init_usb_hardware(void); // Shared implementation. bool usb_enabled(void); void usb_init(void); +void usb_disconnect(void); // Propagate plug/unplug events to the MSC logic. void usb_msc_mount(void); -- cgit v1.2.3