clean up example to use CFG_TUD_ENABLED + CFG_TUD_MAX_SPEED instead of CFG_TUSB_RHPORT0_MODE

This commit is contained in:
hathach
2022-06-06 17:35:17 +07:00
parent 1b08672945
commit f4c80dd218
6 changed files with 89 additions and 95 deletions

View File

@@ -123,9 +123,10 @@ void usb_device_task(void* param)
{
(void) param;
// init device stack on configured roothub port
// This should be called after scheduler/kernel is started.
// Otherwise it could cause kernel issue since USB IRQ handler does use RTOS queue API.
tusb_init();
tud_init(BOARD_TUD_RHPORT);
// RTOS forever loop
while (1)