summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/portable/wch/dcd_ch32_usbfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/wch/dcd_ch32_usbfs.c b/src/portable/wch/dcd_ch32_usbfs.c
index 37677276c..4ecaf129e 100644
--- a/src/portable/wch/dcd_ch32_usbfs.c
+++ b/src/portable/wch/dcd_ch32_usbfs.c
@@ -183,7 +183,6 @@ void dcd_int_handler(uint8_t rhport) {
uint8_t ep = USBFS_INT_ST_MASK_UIS_ENDP(USBOTG_FS->INT_ST);
uint8_t token = USBFS_INT_ST_MASK_UIS_TOKEN(USBOTG_FS->INT_ST);
uint16_t rx_len = USBOTG_FS->RX_LEN;
- USBOTG_FS->INT_FG = USBFS_INT_FG_TRANSFER;
switch (token) {
case PID_OUT: {
@@ -207,6 +206,7 @@ void dcd_int_handler(uint8_t rhport) {
break;
}
+ USBOTG_FS->INT_FG = USBFS_INT_FG_TRANSFER;
} else if (status & USBFS_INT_FG_BUS_RST) {
data.ep0_tog = true;
data.xfer[0][TUSB_DIR_OUT].max_size = 64;