summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-05-15 21:46:55 +0700
committerGitHub <[email protected]>2025-05-15 21:46:55 +0700
commit9548d51c7ec3a2c8d42058e366561f7552cf1c1d (patch)
treeee37ca90d37810ac82dafd8ff94993edaddfd1b9 /src/host
parent542e5b4550a01d034b78308d77c408ed89427513 (diff)
parent38e5a67461cf7c819e845a110ef67184c2becbe4 (diff)
Merge pull request #3121 from hathach/bump-gcc14
Bump gcc14
Diffstat (limited to 'src/host')
-rw-r--r--src/host/hub.c1
-rw-r--r--src/host/usbh.c11
2 files changed, 6 insertions, 6 deletions
diff --git a/src/host/hub.c b/src/host/hub.c
index 0ed0e0c42..0b172a596 100644
--- a/src/host/hub.c
+++ b/src/host/hub.c
@@ -201,7 +201,6 @@ bool hub_port_get_status(uint8_t hub_addr, uint8_t hub_port, void* resp,
bool hub_port_get_status_local(uint8_t hub_addr, uint8_t hub_port, hub_port_status_response_t* resp) {
(void) hub_port;
- TU_VERIFY(hub_addr > CFG_TUH_DEVICE_MAX);
hub_interface_t* p_hub = get_hub_itf(hub_addr);
*resp = p_hub->port_status;
return true;
diff --git a/src/host/usbh.c b/src/host/usbh.c
index a3d79a105..b7d5a05f2 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -547,7 +547,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
// TODO better to have an separated queue for newly attached devices
if (_usbh_data.enumerating_daddr == TUSB_INDEX_INVALID_8) {
// New device attached and we are ready
- TU_LOG1("[%u:] USBH Device Attach\r\n", event.rhport);
+ TU_LOG_USBH("[%u:] USBH Device Attach\r\n", event.rhport);
_usbh_data.enumerating_daddr = 0; // enumerate new device with address 0
enum_new_device(&event);
} else {
@@ -562,7 +562,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
break;
case HCD_EVENT_DEVICE_REMOVE:
- TU_LOG1("[%u:%u:%u] USBH DEVICE REMOVED\r\n", event.rhport, event.connection.hub_addr, event.connection.hub_port);
+ TU_LOG_USBH("[%u:%u:%u] USBH DEVICE REMOVED\r\n", event.rhport, event.connection.hub_addr, event.connection.hub_port);
if (_usbh_data.enumerating_daddr == 0 &&
event.rhport == _usbh_data.dev0_bus.rhport &&
event.connection.hub_addr == _usbh_data.dev0_bus.hub_addr &&
@@ -579,7 +579,8 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
uint8_t const epnum = tu_edpt_number(ep_addr);
uint8_t const ep_dir = (uint8_t) tu_edpt_dir(ep_addr);
- TU_LOG_USBH("on EP %02X with %u bytes: %s\r\n", ep_addr, (unsigned int) event.xfer_complete.len, tu_str_xfer_result[event.xfer_complete.result]);
+ TU_LOG_USBH("[:%u] on EP %02X with %u bytes: %s\r\n",
+ event.dev_addr, ep_addr, (unsigned int) event.xfer_complete.len, tu_str_xfer_result[event.xfer_complete.result]);
if (event.dev_addr == 0) {
// device 0 only has control endpoint
@@ -618,7 +619,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
uint8_t drv_id = dev->ep2drv[epnum][ep_dir];
usbh_class_driver_t const* driver = get_driver(drv_id);
if (driver) {
- TU_LOG_USBH("%s xfer callback\r\n", driver->name);
+ TU_LOG_USBH(" %s xfer callback\r\n", driver->name);
driver->xfer_cb(event.dev_addr, ep_addr, (xfer_result_t) event.xfer_complete.result,
event.xfer_complete.len);
} else {
@@ -1463,7 +1464,7 @@ static void process_enumeration(tuh_xfer_t* xfer) {
bool retry = (_usbh_data.enumerating_daddr != TUSB_INDEX_INVALID_8) && (failed_count < ATTEMPT_COUNT_MAX);
if (retry) {
tusb_time_delay_ms_api(ATTEMPT_DELAY_MS); // delay a bit
- TU_LOG1("Enumeration attempt %u/%u\r\n", failed_count+1, ATTEMPT_COUNT_MAX);
+ TU_LOG_USBH("Enumeration attempt %u/%u\r\n", failed_count+1, ATTEMPT_COUNT_MAX);
retry = tuh_control_xfer(xfer);
}