diff options
| author | hathach <[email protected]> | 2019-06-10 22:29:18 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-06-10 22:29:18 +0700 |
| commit | 73d7ab201e46e1eca9a190e65f96db7158805a65 (patch) | |
| tree | 8a6b18fed5d0db2a0098c6c1643e00d0f3b3d6b3 /src/portable/microchip | |
| parent | 7156bfb54d5e9e13c8574b2384a47bd5554798a9 (diff) | |
remove dcd_edpt_busy()
Diffstat (limited to 'src/portable/microchip')
| -rw-r--r-- | src/portable/microchip/samd21/dcd_samd21.c | 16 | ||||
| -rw-r--r-- | src/portable/microchip/samd51/dcd_samd51.c | 16 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c index fedfa2ec9..7f3c34959 100644 --- a/src/portable/microchip/samd21/dcd_samd21.c +++ b/src/portable/microchip/samd21/dcd_samd21.c @@ -229,22 +229,6 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr) } } -bool dcd_edpt_busy (uint8_t rhport, uint8_t ep_addr) -{ - (void) rhport; - - // USBD shouldn't check control endpoint state - if ( 0 == ep_addr ) return false; - - uint8_t const epnum = tu_edpt_number(ep_addr); - UsbDeviceEndpoint* ep = &USB->DEVICE.DeviceEndpoint[epnum]; - - if (tu_edpt_dir(ep_addr) == TUSB_DIR_IN) { - return ep->EPINTFLAG.bit.TRCPT1 == 0 && ep->EPSTATUS.bit.BK1RDY == 1; - } - return ep->EPINTFLAG.bit.TRCPT0 == 0 && ep->EPSTATUS.bit.BK0RDY == 1; -} - /*------------------------------------------------------------------*/ static bool maybe_handle_setup_packet(void) { diff --git a/src/portable/microchip/samd51/dcd_samd51.c b/src/portable/microchip/samd51/dcd_samd51.c index a43609b9e..f2aff857c 100644 --- a/src/portable/microchip/samd51/dcd_samd51.c +++ b/src/portable/microchip/samd51/dcd_samd51.c @@ -233,22 +233,6 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr) } } -bool dcd_edpt_busy (uint8_t rhport, uint8_t ep_addr) -{ - (void) rhport; - - // USBD shouldn't check control endpoint state - if ( 0 == ep_addr ) return false; - - uint8_t const epnum = tu_edpt_number(ep_addr); - UsbDeviceEndpoint* ep = &USB->DEVICE.DeviceEndpoint[epnum]; - - if (tu_edpt_dir(ep_addr) == TUSB_DIR_IN) { - return ep->EPINTFLAG.bit.TRCPT1 == 0 && ep->EPSTATUS.bit.BK1RDY == 1; - } - return ep->EPINTFLAG.bit.TRCPT0 == 0 && ep->EPSTATUS.bit.BK0RDY == 1; -} - /*------------------------------------------------------------------*/ static bool maybe_handle_setup_packet(void) { |
