@@ -464,13 +464,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;
|
||||
|
@@ -365,9 +365,26 @@ bool tuh_rhport_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
|
||||
if (tuh_rhport_is_active(rhport)) {
|
||||
return true; // skip if already initialized
|
||||
}
|
||||
|
||||
TU_LOG_USBH("USBH init on controller %u, speed = %s\r\n", rhport,
|
||||
rh_init->speed == TUSB_SPEED_HIGH ? "High" : "Full");
|
||||
#if CFG_TUSB_DEBUG >= CFG_TUH_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_USBH("USBH init on controller %u, speed = %s\r\n", rhport, speed_str);
|
||||
#endif
|
||||
|
||||
// Init host stack if not already
|
||||
if (!tuh_inited()) {
|
||||
|
Reference in New Issue
Block a user