summaryrefslogtreecommitdiff
path: root/tinyusb/host/usbh.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-12-18 16:23:09 +0700
committerhathach <[email protected]>2013-12-18 16:23:09 +0700
commitb828aabbe4e65f5852eda3b2e0a0f58323a9c501 (patch)
treed42a31b463420104e7a66809463b7e6f16d7f44c /tinyusb/host/usbh.c
parenteaacbd4a3618945929c6e1b9db1d5ac94ca3ba98 (diff)
implement hcd_pipe_close, able to plug & unplug device from ohci lpc17xx
Diffstat (limited to 'tinyusb/host/usbh.c')
-rw-r--r--tinyusb/host/usbh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 0589bad2c..e701d2605 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -304,13 +304,16 @@ static void usbh_device_unplugged(uint8_t hostid, uint8_t hub_addr, uint8_t hub_
usbh_class_drivers[class_index].close(dev_addr);
}
}
- usbh_pipe_control_close(dev_addr);
+ // TODO refractor
// set to REMOVING to allow HCD to clean up its cached data for this device
// HCD must set this device's state to TUSB_DEVICE_STATE_UNPLUG when done
usbh_devices[dev_addr].state = TUSB_DEVICE_STATE_REMOVING;
usbh_devices[dev_addr].flag_supported_class = 0;
+ usbh_pipe_control_close(dev_addr);
+
+
is_found = true;
}
}