summaryrefslogtreecommitdiff
path: root/tinyusb/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-07 16:39:33 +0700
committerhathach <[email protected]>2018-03-07 16:39:33 +0700
commitc7f6c95c2837365e4fe7518fa9bcbfbabb1c9ad5 (patch)
tree3c47e557c983520e4ec59ad3738112bafcba5d03 /tinyusb/device
parent7092db264f9284c23d777562947111369baf7f68 (diff)
fix tusb_mount_cb and tusb_umount_cb not called
Diffstat (limited to 'tinyusb/device')
-rw-r--r--tinyusb/device/usbd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c
index 5590b4bdc..1ed854cae 100644
--- a/tinyusb/device/usbd.c
+++ b/tinyusb/device/usbd.c
@@ -357,6 +357,9 @@ static tusb_error_t usbd_set_configure_received(uint8_t coreid, uint8_t config_n
}
}
+ // invoke callback
+ tud_mount_cb(coreid);
+
return TUSB_ERROR_NONE;
}
@@ -421,6 +424,9 @@ void hal_dcd_bus_event(uint8_t coreid, usbd_bus_event_type_t bus_event)
{
if ( usbd_class_drivers[class_code].close ) usbd_class_drivers[class_code].close( coreid );
}
+
+ // invoke callback
+ tud_umount_cb(coreid);
break;
case USBD_BUS_EVENT_UNPLUGGED : break;