summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2025-10-22 06:12:08 +0000
committercopilot-swe-agent[bot] <[email protected]>2025-10-22 06:12:08 +0000
commit27415e6114cb6e23ca085b21161eb79278f6b97b (patch)
tree43d1d403c57a40dccc0cb4b3b3cb134a100e7ac1 /src/class/hid
parent16cfe6895a4ee6d6b196e99a033a7326908f8d8a (diff)
Add is_isr parameter to usbd_edpt_xfer and usbd_edpt_xfer_fifo
- Added bool is_isr parameter to usbd_edpt_xfer() and usbd_edpt_xfer_fifo() wrapper functions - These are called by class drivers to queue USB transfers - Updated all callers to pass false by default (non-ISR context) - Updated audiod_rx_xfer_isr() and audiod_tx_xfer_isr() to pass true (ISR context) - All 21 unit tests pass Co-authored-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index b4f24902b..6ee4cd9c1 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -128,7 +128,7 @@ bool tud_hid_n_report(uint8_t instance, uint8_t report_id, void const *report, u
TU_VERIFY(0 == tu_memcpy_s(p_epbuf->epin, CFG_TUD_HID_EP_BUFSIZE, report, len));
}
- return usbd_edpt_xfer(rhport, p_hid->ep_in, p_epbuf->epin, len);
+ return usbd_edpt_xfer(rhport, p_hid->ep_in, p_epbuf->epin, len, false);
}
uint8_t tud_hid_n_interface_protocol(uint8_t instance) {
@@ -263,7 +263,7 @@ uint16_t hidd_open(uint8_t rhport, tusb_desc_interface_t const *desc_itf, uint16
// Prepare for output endpoint
if (p_hid->ep_out) {
- TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE), drv_len);
+ TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE, false), drv_len);
}
return drv_len;
@@ -413,7 +413,7 @@ bool hidd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
}
// prepare for new transfer
- TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE));
+ TU_ASSERT(usbd_edpt_xfer(rhport, p_hid->ep_out, p_epbuf->epout, CFG_TUD_HID_EP_BUFSIZE, false));
}
return true;