diff options
| author | hathach <[email protected]> | 2013-03-26 02:06:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-26 02:06:30 +0700 |
| commit | a7e8a2ba9aa5e8a6ba074f397b1fd789a8f25205 (patch) | |
| tree | 9208c2a5f79ef45cbfedfa45fff7b798146b3cfe /tinyusb/host | |
| parent | 086a8e4a2dbd78dc42a6359c40e1920c9b93a701 (diff) | |
pass all the current tests
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/usbh.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index 587e8a840..7559142c2 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -232,8 +232,11 @@ void usbh_device_unplugged_isr(uint8_t hostid) // if device unplugged is not a hub TODO handle hub unplugged for (uint8_t class_code = 1; class_code < TUSB_CLASS_MAX_CONSEC_NUMBER; class_code++) { - if (usbh_class_drivers[class_code].close) + if ((usbh_devices[dev_addr].flag_supported_class & BIT_(class_code)) && + usbh_class_drivers[class_code].close) + { usbh_class_drivers[class_code].close(dev_addr); + } } } |
