diff options
| author | hathach <[email protected]> | 2025-11-19 11:32:44 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-19 11:32:44 +0700 |
| commit | fd3161087d76c84fb21e8e2f2d30a81d6b11bfba (patch) | |
| tree | 527172cad87c76062490e4ecc9277e21d3691224 /src/device/usbd_control.c | |
| parent | be4b38c54dc4e23af322ae04eda1f30e5ced0289 (diff) | |
| parent | d46f71bdde8b3160b0efaf83598d6b4cf596f787 (diff) | |
Merge branch 'refs/heads/master' into dwc2_ep0
# Conflicts:
# examples/device/dfu/src/usb_descriptors.c
# examples/device/dfu_runtime/src/usb_descriptors.c
# src/device/usbd_control.c
# src/portable/synopsys/dwc2/dcd_dwc2.c
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 cee48d43c..745530f69 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_EP0_BUFSIZE, _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 |
