diff options
| author | hathach <[email protected]> | 2019-03-27 16:26:52 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-27 16:26:52 +0700 |
| commit | f26fbaf404c772c0ce4e48d36d94c2743f3a8aee (patch) | |
| tree | f6530b2b062833ceafb2b575c25416d42e34962b /src/device/usbd.c | |
| parent | 1e9848d917550b0af2115bc629d5e7e4743f23c7 (diff) | |
clean up remove usbd_control_stall()
Diffstat (limited to 'src/device/usbd.c')
| -rw-r--r-- | src/device/usbd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index b79ccae2b..17914fb6c 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -104,7 +104,6 @@ static usbd_class_driver_t const usbd_class_drivers[] = },
#endif
-
#if CFG_TUD_HID
{
.class_code = TUSB_CLASS_HID,
@@ -243,10 +242,12 @@ void tud_task (void) switch ( event.event_id )
{
case DCD_EVENT_SETUP_RECEIVED:
- // Process control request, if failed control endpoint is stalled
+ // Process control request
if ( !process_control_request(event.rhport, &event.setup_received) )
{
- usbd_control_stall(event.rhport);
+ // Failed -> stall both control endpoint IN and OUT
+ dcd_edpt_stall(event.rhport, 0);
+ dcd_edpt_stall(event.rhport, 0 | TUSB_DIR_IN_MASK);
}
break;
|
