summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorWilliam D. Jones <[email protected]>2019-10-02 23:02:55 -0400
committerWilliam D. Jones <[email protected]>2019-10-02 23:02:55 -0400
commitb0b737b42a14982a1f928e408ba7eadc3f474d04 (patch)
tree69bca09ad2c341a579358b0232ea2fde8f4fe380 /src/device
parent05914de10992c0bc0f35f6fc3c6bc8064ffcd935 (diff)
usbd_control.c: Decide whether a control transfer has a data stage
based on setup packet wLength.
Diffstat (limited to 'src/device')
-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 eed933f68..69ab47b4d 100644
--- a/src/device/usbd_control.c
+++ b/src/device/usbd_control.c
@@ -1,4 +1,4 @@
-/*
+/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
@@ -94,7 +94,7 @@ bool tud_control_xfer(uint8_t rhport, tusb_control_request_t const * request, vo
_control_state.total_len = tu_min16(len, request->wLength);
_control_state.total_transferred = 0;
- if ( len )
+ if ( _control_state.total_len )
{
TU_ASSERT(buffer);