fix hid close not clear data

This commit is contained in:
hathach 2024-03-31 15:48:26 +07:00
parent 32743f112c
commit 2012a0d369
No known key found for this signature in database
GPG Key ID: 26FAB84F615C3C52

View File

@ -410,8 +410,7 @@ void hidh_close(uint8_t daddr) {
if (p_hid->daddr == daddr) {
TU_LOG_DRV(" HIDh close addr = %u index = %u\r\n", daddr, i);
if (tuh_hid_umount_cb) tuh_hid_umount_cb(daddr, i);
p_hid->daddr = 0;
p_hid->mounted = false;
tu_memclr(p_hid, sizeof(hidh_interface_t));
}
}
}