diff options
| author | HiFiPhile <[email protected]> | 2026-05-22 18:14:58 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2026-05-22 18:14:58 +0200 |
| commit | 28d4ec5723428cbdb085ecdaa70e7fd2bf7f893d (patch) | |
| tree | db1b4e16cafee7f502c9f212b000750ae6cf2501 | |
| parent | 61a8f688c800626962cfed4022f4672b35ceb3ae (diff) | |
dcd/ch32fs: reset EP on clear stall
Signed-off-by: HiFiPhile <[email protected]>
| -rw-r--r-- | src/portable/wch/dcd_ch32_usbfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/wch/dcd_ch32_usbfs.c b/src/portable/wch/dcd_ch32_usbfs.c index f6c573b47..8f583510c 100644 --- a/src/portable/wch/dcd_ch32_usbfs.c +++ b/src/portable/wch/dcd_ch32_usbfs.c @@ -362,9 +362,9 @@ void dcd_edpt_clear_stall(uint8_t rhport, uint8_t ep_addr) { } } else { if (dir == TUSB_DIR_OUT) { - EP_RX_CTRL(ep) = (EP_RX_CTRL(ep) & ~(USBFS_EP_R_RES_MASK | USBFS_EP_R_TOG)) | USBFS_EP_R_RES_ACK; + EP_RX_CTRL(ep) = USBFS_EP_R_AUTO_TOG | USBFS_EP_R_RES_NAK; } else { - EP_TX_CTRL(ep) = (EP_TX_CTRL(ep) & ~(USBFS_EP_T_RES_MASK | USBFS_EP_T_TOG)) | USBFS_EP_T_RES_NAK; + EP_TX_CTRL(ep) = USBFS_EP_T_AUTO_TOG | USBFS_EP_T_RES_NAK; } } } |
