mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
fix tusb_mount_cb and tusb_umount_cb not called
This commit is contained in:
parent
7092db264f
commit
c7f6c95c28
@ -120,8 +120,8 @@
|
||||
* - VERIFY_1ARGS : return false if failed
|
||||
* - VERIFY_2ARGS : return provided value if failed
|
||||
*------------------------------------------------------------------*/
|
||||
#define VERIFY_1ARGS(cond) do { if (!(cond)) { hal_debugger_breakpoint(); return false; } } while(0)
|
||||
#define VERIFY_2ARGS(cond, _error) do { if (!(cond)) { hal_debugger_breakpoint(); return _error;} } while(0)
|
||||
#define VERIFY_1ARGS(cond) do { if (!(cond)) return false; } while(0)
|
||||
#define VERIFY_2ARGS(cond, _error) do { if (!(cond)) return _error; } while(0)
|
||||
|
||||
/**
|
||||
* Check if condition is success (true), otherwise return
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user