summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-07-01 22:43:58 +0700
committerGitHub <[email protected]>2025-07-01 22:43:58 +0700
commit0d6cb38163692fa8795d75b8eda9454c579bea4a (patch)
treed1c4c18b039f89fecbe9bb69442ef3a32357aca6 /src/host
parentcd96277bdc7ec83fd414a7a5aa8e61fa14d28a45 (diff)
parentc96cc4369f1b97efe85575f3e5633e38598e9fc2 (diff)
Merge pull request #2967 from HiFiPhile/async_io
MSC Device: Add asynchronous IO support
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index adaeef092..ce83977c5 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -438,9 +438,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()) {