summaryrefslogtreecommitdiff
path: root/port/fsdev/usb_dc_fsdev.c
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-01-26 21:59:15 +0800
committersakumisu <[email protected]>2022-01-26 22:15:09 +0800
commita8a9a9b41f491f484f46feb61d80e400f706d23b (patch)
tree522f669491ebdfd37bd7a6b2e38898db84229e4f /port/fsdev/usb_dc_fsdev.c
parent43005a1b89c9b10a8b6589b0fd6ebf206aef0c03 (diff)
delete repeatable file
Diffstat (limited to 'port/fsdev/usb_dc_fsdev.c')
-rw-r--r--port/fsdev/usb_dc_fsdev.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/port/fsdev/usb_dc_fsdev.c b/port/fsdev/usb_dc_fsdev.c
index e767dbe2..e16577f2 100644
--- a/port/fsdev/usb_dc_fsdev.c
+++ b/port/fsdev/usb_dc_fsdev.c
@@ -352,26 +352,27 @@ void USBD_IRQHandler(void)
USBx->DADDR = ((uint16_t)usb_dc_cfg.USB_Address | USB_DADDR_EF);
usb_dc_cfg.USB_Address = 0U;
}
- }
- /* DIR = 1 */
+ } else {
+ /* DIR = 1 */
- /* DIR = 1 & CTR_RX => SETUP or OUT int */
- /* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */
+ /* DIR = 1 & CTR_RX => SETUP or OUT int */
+ /* DIR = 1 & (CTR_TX | CTR_RX) => 2 int pending */
- wEPVal = PCD_GET_ENDPOINT(USBx, 0);
+ wEPVal = PCD_GET_ENDPOINT(USBx, 0);
- if ((wEPVal & USB_EP_SETUP) != 0U) {
- /* SETUP bit kept frozen while CTR_RX = 1 */
- PCD_CLEAR_RX_EP_CTR(USBx, 0);
+ if ((wEPVal & USB_EP_SETUP) != 0U) {
+ /* SETUP bit kept frozen while CTR_RX = 1 */
+ PCD_CLEAR_RX_EP_CTR(USBx, 0);
- /* Process SETUP Packet*/
- usbd_event_notify_handler(USBD_EVENT_SETUP_NOTIFY, NULL);
- PCD_SET_EP_RX_STATUS(USBx, 0, USB_EP_RX_VALID);
- } else if ((wEPVal & USB_EP_CTR_RX) != 0U) {
- PCD_CLEAR_RX_EP_CTR(USBx, 0);
- /* Process Control Data OUT Packet */
- usbd_event_notify_handler(USBD_EVENT_EP0_OUT_NOTIFY, NULL);
- PCD_SET_EP_RX_STATUS(USBx, 0, USB_EP_RX_VALID);
+ /* Process SETUP Packet*/
+ usbd_event_notify_handler(USBD_EVENT_SETUP_NOTIFY, NULL);
+ PCD_SET_EP_RX_STATUS(USBx, 0, USB_EP_RX_VALID);
+ } else if ((wEPVal & USB_EP_CTR_RX) != 0U) {
+ PCD_CLEAR_RX_EP_CTR(USBx, 0);
+ /* Process Control Data OUT Packet */
+ usbd_event_notify_handler(USBD_EVENT_EP0_OUT_NOTIFY, NULL);
+ PCD_SET_EP_RX_STATUS(USBx, 0, USB_EP_RX_VALID);
+ }
}
} else {
/* Decode and service non control endpoints interrupt */