summaryrefslogtreecommitdiff
path: root/src/device/usbd_control.c
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/device/usbd_control.c
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/device/usbd_control.c')
-rw-r--r--src/device/usbd_control.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c
index c9700fd9d..b75362425 100644
--- a/src/device/usbd_control.c
+++ b/src/device/usbd_control.c
@@ -71,7 +71,7 @@ CFG_TUD_MEM_SECTION static struct {
static inline bool status_stage_xact(uint8_t rhport, const tusb_control_request_t* request) {
// Opposite to endpoint in Data Phase
const uint8_t ep_addr = request->bmRequestType_bit.direction ? EDPT_CTRL_OUT : EDPT_CTRL_IN;
- return usbd_edpt_xfer(rhport, ep_addr, NULL, 0);
+ return usbd_edpt_xfer(rhport, ep_addr, NULL, 0, false);
}
// Status phase
@@ -98,7 +98,7 @@ static bool data_stage_xact(uint8_t rhport) {
}
}
- return usbd_edpt_xfer(rhport, ep_addr, xact_len ? _ctrl_epbuf.buf : NULL, xact_len);
+ return usbd_edpt_xfer(rhport, ep_addr, xact_len ? _ctrl_epbuf.buf : NULL, xact_len, false);
}
// Transmit data to/from the control endpoint.