summaryrefslogtreecommitdiff
path: root/src/device/usbd_control.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-03-27 16:26:52 +0700
committerhathach <[email protected]>2019-03-27 16:26:52 +0700
commitf26fbaf404c772c0ce4e48d36d94c2743f3a8aee (patch)
treef6530b2b062833ceafb2b575c25416d42e34962b /src/device/usbd_control.c
parent1e9848d917550b0af2115bc629d5e7e4743f23c7 (diff)
clean up remove usbd_control_stall()
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