diff options
| author | Dan Halbert <halbert@halwitz.org> | 2020-07-28 17:52:56 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2020-07-28 17:52:56 -0400 |
| commit | 65c22aa4347abc145493f44a4bc8d91a4f200860 (patch) | |
| tree | 2a199e291fc6502b32a939296ab42d15406b7960 /supervisor | |
| parent | 8abf8c2c5017bb31226a1e728c4bac19cbf90738 (diff) | |
storage.erase_filesystem(): unmount and wait 1 second before resetting
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/usb/usb.c | 4 | ||||
| -rw-r--r-- | supervisor/usb.h | 1 |
2 files changed, 5 insertions, 0 deletions
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); |
