diff options
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/usbd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index d1b708a0d..ad40e3c9f 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -272,7 +272,8 @@ static void usbd_task_body(void) // TODO remove since if task is too slow, we could clear the event of the new attached
osal_queue_reset(_usbd_q);
- tud_umount_cb(); // invoke callback
+ // invoke callback
+ if (tud_umount_cb) tud_umount_cb();
break;
case DCD_EVENT_SOF:
@@ -467,7 +468,7 @@ static bool process_set_config(uint8_t rhport) }
// invoke callback
- tud_mount_cb();
+ if (tud_mount_cb) tud_mount_cb();
return TUSB_ERROR_NONE;
}
|
