summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-05-13 10:28:42 +0700
committerhathach <[email protected]>2025-05-13 12:16:22 +0700
commitbaf67539fc2d328a6274c35c18c90da27c37bc60 (patch)
treeaab0a97adce14180145a4fb6fa78eee357daa0cb /src/class/hid
parent228b2dec1c29de2db531cc4eff98444b4221ca46 (diff)
fix warnings, minor clean up
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_host.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index a3cc7d6d7..57e437196 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -444,7 +444,7 @@ bool hidh_xfer_cb(uint8_t daddr, uint8_t ep_addr, xfer_result_t result, uint32_t
hidh_epbuf_t* epbuf = get_hid_epbuf(idx);
if (dir == TUSB_DIR_IN) {
- TU_LOG_DRV(" Get Report callback (%u, %u)\r\n", daddr, idx);
+ TU_LOG_DRV(" [idx=%u] Get Report callback\r\n", idx);
TU_LOG3_MEM(epbuf->epin, xferred_bytes, 2);
tuh_hid_report_received_cb(daddr, idx, epbuf->epin, (uint16_t) xferred_bytes);
} else {
@@ -461,7 +461,9 @@ void hidh_close(uint8_t daddr) {
hidh_interface_t* p_hid = &_hidh_itf[i];
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);
+ if (tuh_hid_umount_cb) {
+ tuh_hid_umount_cb(daddr, i);
+ }
tu_memclr(p_hid, sizeof(hidh_interface_t));
}
}