diff options
| author | hathach <[email protected]> | 2019-05-12 15:54:11 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-05-12 15:54:11 +0700 |
| commit | aaf5848ce15c5d6ccf4c51c3ef7b04fb787639ee (patch) | |
| tree | 2a04ff594ea42234c532fc4ab5f8e6f0b4603623 /src/device/usbd_control.c | |
| parent | bfa073818c83266c2353ccf4fce580eef62e4a0c (diff) | |
| parent | 1174949308bb7595e99fd5789ebf3466cf2ab123 (diff) | |
Merge pull request #64 from hathach/develop
add callback for descriptors device/configuration/string/hid
Diffstat (limited to 'src/device/usbd_control.c')
| -rw-r--r-- | src/device/usbd_control.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c index 8460a11b0..0b878fbcb 100644 --- a/src/device/usbd_control.c +++ b/src/device/usbd_control.c @@ -93,8 +93,10 @@ bool usbd_control_xfer(uint8_t rhport, tusb_control_request_t const * request, v _control_state.total_len = tu_min16(len, request->wLength);
_control_state.total_transferred = 0;
- if ( buffer != NULL && len )
+ if ( len )
{
+ TU_ASSERT(buffer);
+
// Data stage
TU_ASSERT( start_control_data_xact(rhport) );
}else
|
