summaryrefslogtreecommitdiff
path: root/src/portable/st
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-03-27 16:09:49 +0700
committerhathach <[email protected]>2019-03-27 16:09:49 +0700
commit1e9848d917550b0af2115bc629d5e7e4743f23c7 (patch)
tree4642aacd58b24f96a5c8ac86364297f1f388112e /src/portable/st
parent472237665479961a714b6775e7fc9289e5e6c9ee (diff)
replace dcd_edpt_(clear)stall by usbd_edpt_(clear)stall
- remove dcd_edpt_stalled() from dcd porting
Diffstat (limited to 'src/portable/st')
-rw-r--r--src/portable/st/stm32f3/dcd_stm32f3.c3
-rw-r--r--src/portable/st/stm32f4/dcd_stm32f4.c24
2 files changed, 0 insertions, 27 deletions
diff --git a/src/portable/st/stm32f3/dcd_stm32f3.c b/src/portable/st/stm32f3/dcd_stm32f3.c
index 3b3dc418c..138c454a7 100644
--- a/src/portable/st/stm32f3/dcd_stm32f3.c
+++ b/src/portable/st/stm32f3/dcd_stm32f3.c
@@ -70,9 +70,6 @@ void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr)
{}
void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
{}
-bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
-{
- return false;}
#endif
diff --git a/src/portable/st/stm32f4/dcd_stm32f4.c b/src/portable/st/stm32f4/dcd_stm32f4.c
index 850b7b1b3..db72f92d3 100644
--- a/src/portable/st/stm32f4/dcd_stm32f4.c
+++ b/src/portable/st/stm32f4/dcd_stm32f4.c
@@ -299,30 +299,6 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
return true;
}
-bool dcd_edpt_stalled (uint8_t rhport, uint8_t ep_addr)
-{
- (void) rhport;
- USB_OTG_OUTEndpointTypeDef * out_ep = OUT_EP_BASE;
- USB_OTG_INEndpointTypeDef * in_ep = IN_EP_BASE;
-
- // control is never got halted
- if(ep_addr == 0) {
- return false;
- }
-
- uint8_t const epnum = tu_edpt_number(ep_addr);
- uint8_t const dir = tu_edpt_dir(ep_addr);
- bool stalled = false;
-
- if(dir == TUSB_DIR_IN) {
- stalled = (in_ep[epnum].DIEPCTL & USB_OTG_DIEPCTL_STALL_Msk);
- } else {
- stalled = (out_ep[epnum].DOEPCTL & USB_OTG_DOEPCTL_STALL_Msk);
- }
-
- return stalled;
-}
-
// TODO: The logic for STALLing and disabling an endpoint is very similar
// (send STALL versus NAK handshakes back). Refactor into resuable function.
void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr)