summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index d4dfae4b4..f923dfe08 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -587,6 +587,10 @@ bool tud_deinit(uint8_t rhport) {
}
}
+ // Clear device data
+ tu_varclr(&_usbd_dev);
+ usbd_control_reset();
+
// Deinit device queue & task
osal_queue_delete(_usbd_q);
_usbd_q = NULL;
@@ -598,6 +602,9 @@ bool tud_deinit(uint8_t rhport) {
#endif
_usbd_rhport = RHPORT_INVALID;
+
+ tud_umount_cb();
+
return true;
}