summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2022-03-11 14:02:10 +0700
committerGitHub <[email protected]>2022-03-11 14:02:10 +0700
commitd3c7d7b09ec95144c24162cc143e33bb330df66f (patch)
tree9473379438757839c4cbaa219f935e8221bc3104 /src
parent69ef918021b1c4c97db3bfa41f73b0348ec617c8 (diff)
parent6b5490ced687ba44ede9a0dd1dd62b4b67eedf59 (diff)
Merge pull request #1394 from hathach/merge-host-example
merge device_info into bare_api example
Diffstat (limited to 'src')
-rw-r--r--src/host/usbh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index 11bf2f997..617aff79a 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -535,7 +535,7 @@ void tuh_task(void)
break;
case HCD_EVENT_DEVICE_REMOVE:
- TU_LOG2("USBH DEVICE REMOVED\r\n");
+ TU_LOG2("[%u:%u:%u] USBH DEVICE REMOVED\r\n", event.rhport, event.connection.hub_addr, event.connection.hub_port);
process_device_unplugged(event.rhport, event.connection.hub_addr, event.connection.hub_port);
#if CFG_TUH_HUB
@@ -924,6 +924,8 @@ static void process_device_unplugged(uint8_t rhport, uint8_t hub_addr, uint8_t h
(hub_port == 0 || dev->hub_port == hub_port) &&
dev->connected)
{
+ TU_LOG2(" Address = %u\r\n", dev_addr);
+
// Invoke callback before close driver
if (tuh_umount_cb) tuh_umount_cb(dev_addr);