Merge remote-tracking branch 'origin/master' into xfer_isr

# Conflicts:
#	examples/device/audio_4_channel_mic_freertos/src/main.c
#	examples/device/audio_test_freertos/src/main.c
#	src/class/audio/audio_device.c
This commit is contained in:
hathach
2025-07-08 10:09:24 +07:00
133 changed files with 4256 additions and 2053 deletions

View File

@@ -477,13 +477,30 @@ bool tud_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
return true; // skip if already initialized
}
TU_ASSERT(rh_init);
TU_LOG_USBD("USBD init on controller %u, speed = %s\r\n", rhport,
rh_init->speed == TUSB_SPEED_HIGH ? "High" : "Full");
#if CFG_TUSB_DEBUG >= CFG_TUD_LOG_LEVEL
char const* speed_str = 0;
switch (rh_init->speed) {
case TUSB_SPEED_HIGH:
speed_str = "High";
break;
case TUSB_SPEED_FULL:
speed_str = "Full";
break;
case TUSB_SPEED_LOW:
speed_str = "Low";
break;
case TUSB_SPEED_AUTO:
speed_str = "Auto";
break;
default:
break;
}
TU_LOG_USBD("USBD init on controller %u, speed = %s\r\n", rhport, speed_str);
TU_LOG_INT(CFG_TUD_LOG_LEVEL, sizeof(usbd_device_t));
TU_LOG_INT(CFG_TUD_LOG_LEVEL, sizeof(dcd_event_t));
TU_LOG_INT(CFG_TUD_LOG_LEVEL, sizeof(tu_fifo_t));
TU_LOG_INT(CFG_TUD_LOG_LEVEL, sizeof(tu_edpt_stream_t));
#endif
tu_varclr(&_usbd_dev);
_usbd_queued_setup = 0;