Merge pull request #2559 from hathach/fix-hid-close-not-clear-data

fix hid close not clear data
This commit is contained in:
Ha Thach 2024-03-31 18:29:54 +07:00 committed by GitHub
commit fadd9524c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

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));
}
}
}