summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-08-24 01:06:05 +0700
committerhathach <[email protected]>2021-08-24 01:06:05 +0700
commit353c070d00a31ef9eed1e701d4048414fe704738 (patch)
tree6b24d85e6d4714c514cc5a19c3a2a16325a7c616 /src/class/hid
parent3309425211639121ce72784405106ab22c4a426e (diff)
exclude dev0 from usbh devices pool
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_host.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index a9ea03de6..3a832a247 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -243,9 +243,10 @@ void hidh_close(uint8_t dev_addr)
TU_VERIFY(dev_addr <= CFG_TUH_DEVICE_MAX, );
hidh_device_t* hid_dev = get_dev(dev_addr);
+
if (tuh_hid_umount_cb)
{
- for ( uint8_t inst = 0; inst < hid_dev->inst_count; inst++ ) tuh_hid_umount_cb(dev_addr, inst);
+ for (uint8_t inst = 0; inst < hid_dev->inst_count; inst++ ) tuh_hid_umount_cb(dev_addr, inst);
}
tu_memclr(hid_dev, sizeof(hidh_device_t));