mirror of
https://github.com/hathach/tinyusb.git
synced 2026-08-18 11:02:16 +00:00
ch32_usbhs: fix endpoint stall length index and clear-stall response
Fix issue in the stall handling: - dcd_edpt_stall() for an IN endpoint cleared EP_TX_LEN(0) instead of EP_TX_LEN(ep_num), clobbering endpoint 0's transmit length register when stalling any other IN endpoint. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -354,7 +354,7 @@ void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr) {
|
||||
if (dir == TUSB_DIR_OUT) {
|
||||
EP_RX_CTRL(ep_num) = USBHS_EP_R_RES_STALL;
|
||||
} else {
|
||||
EP_TX_LEN(0) = 0;
|
||||
EP_TX_LEN(ep_num) = 0;
|
||||
EP_TX_CTRL(ep_num) = USBHS_EP_T_RES_STALL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user