summaryrefslogtreecommitdiff
path: root/src/device/usbd_control.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd_control.c')
-rw-r--r--src/device/usbd_control.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/device/usbd_control.c b/src/device/usbd_control.c
index 094d2fb44..d907aca3b 100644
--- a/src/device/usbd_control.c
+++ b/src/device/usbd_control.c
@@ -60,13 +60,6 @@ void usbd_control_reset (uint8_t rhport)
tu_varclr(&_control_state);
}
-void usbd_control_stall(uint8_t rhport)
-{
- // when stalling control endpoint both IN and OUt will be stalled
- dcd_edpt_stall(rhport, EDPT_CTRL_OUT);
- dcd_edpt_stall(rhport, EDPT_CTRL_IN);
-}
-
bool usbd_control_status(uint8_t rhport, tusb_control_request_t const * request)
{
// status direction is reversed to one in the setup packet
@@ -147,8 +140,9 @@ bool usbd_control_xfer_cb (uint8_t rhport, uint8_t ep_addr, xfer_result_t result
TU_ASSERT( usbd_control_status(rhport, &_control_state.request) );
}else
{
- // stall due to callback
- usbd_control_stall(rhport);
+ // Stall both IN and OUT control endpoint
+ dcd_edpt_stall(rhport, EDPT_CTRL_OUT);
+ dcd_edpt_stall(rhport, EDPT_CTRL_IN);
}
}
else