diff options
| author | HiFiPhile <[email protected]> | 2025-11-11 14:11:20 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-11-11 14:11:20 +0100 |
| commit | 2f0a35f21af4c09154d6b4b5b118325af8990e51 (patch) | |
| tree | b8cb51ecbe4610e2f762193b5ce311b25df97b2e /src/device/usbd_control.c | |
| parent | 1ee47acd9070639043e4fc7ec132574f2922748c (diff) | |
| parent | 8a094e807b34bcc018c971d59acb660b1a9ddf9f (diff) | |
Merge remote-tracking branch 'tinyusb/master' into copilot/fix-dcd-edpt-xfer-issue
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/device/usbd_control.c')
| -rw-r--r-- | src/device/usbd_control.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c index b75362425..70827bfee 100644 --- a/src/device/usbd_control.c +++ b/src/device/usbd_control.c @@ -93,7 +93,7 @@ static bool data_stage_xact(uint8_t rhport) { if (_ctrl_xfer.request.bmRequestType_bit.direction == TUSB_DIR_IN) { ep_addr = EDPT_CTRL_IN; - if (xact_len) { + if (0u != xact_len) { TU_VERIFY(0 == tu_memcpy_s(_ctrl_epbuf.buf, CFG_TUD_ENDPOINT0_SIZE, _ctrl_xfer.buffer, xact_len)); } } @@ -159,7 +159,7 @@ bool usbd_control_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, // invoke optional dcd hook if available dcd_edpt0_status_complete(rhport, &_ctrl_xfer.request); - if (_ctrl_xfer.complete_cb) { + if (NULL != _ctrl_xfer.complete_cb) { // TODO refactor with usbd_driver_print_control_complete_name _ctrl_xfer.complete_cb(rhport, CONTROL_STAGE_ACK, &_ctrl_xfer.request); } @@ -185,7 +185,7 @@ bool usbd_control_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, // invoke complete callback if set // callback can still stall control in status phase e.g out data does not make sense - if (_ctrl_xfer.complete_cb) { + if (NULL != _ctrl_xfer.complete_cb) { #if CFG_TUSB_DEBUG >= CFG_TUD_LOG_LEVEL usbd_driver_print_control_complete_name(_ctrl_xfer.complete_cb); #endif |
