add tusb_inited() API, check for inited() before running device/host task
This commit is contained in:
@@ -620,6 +620,9 @@ bool enum_task(hcd_event_t* event)
|
||||
*/
|
||||
void tuh_task(void)
|
||||
{
|
||||
// Skip if stack is not initialized
|
||||
if ( !tusb_inited() ) return;
|
||||
|
||||
// Loop until there is no more events in the queue
|
||||
while (1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user