summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-05-15 21:46:55 +0700
committerGitHub <[email protected]>2025-05-15 21:46:55 +0700
commit9548d51c7ec3a2c8d42058e366561f7552cf1c1d (patch)
treeee37ca90d37810ac82dafd8ff94993edaddfd1b9 /src/class
parent542e5b4550a01d034b78308d77c408ed89427513 (diff)
parent38e5a67461cf7c819e845a110ef67184c2becbe4 (diff)
Merge pull request #3121 from hathach/bump-gcc14
Bump gcc14
Diffstat (limited to 'src/class')
-rw-r--r--src/class/cdc/cdc_host.c2
-rw-r--r--src/class/hid/hid_host.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c
index 4058857c5..bf245db3f 100644
--- a/src/class/cdc/cdc_host.c
+++ b/src/class/cdc/cdc_host.c
@@ -672,7 +672,7 @@ void cdch_close(uint8_t daddr) {
bool cdch_xfer_cb(uint8_t daddr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes) {
// TODO handle stall response, retry failed transfer ...
- TU_ASSERT(event == XFER_RESULT_SUCCESS);
+ TU_VERIFY(event == XFER_RESULT_SUCCESS);
uint8_t const idx = get_idx_by_ep_addr(daddr, ep_addr);
cdch_interface_t * p_cdc = get_itf(idx);
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));
}
}