diff options
| author | sakimisu <[email protected]> | 2023-03-15 21:38:41 +0800 |
|---|---|---|
| committer | sakimisu <[email protected]> | 2023-03-15 21:38:41 +0800 |
| commit | bb8cfe23dee8a1855236d9f8ccf7eaa2d83d8e1d (patch) | |
| tree | aee8d548856dc9ab76f4c60e7749880347dbdc52 | |
| parent | 4cd9031d31c2cd2a045e72122e1e8e7d28d6a3b7 (diff) | |
fix ep0 data receive
| -rw-r--r-- | port/ch32/usb_dc_usbhs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/port/ch32/usb_dc_usbhs.c b/port/ch32/usb_dc_usbhs.c index 6ab8d345..359e00e6 100644 --- a/port/ch32/usb_dc_usbhs.c +++ b/port/ch32/usb_dc_usbhs.c @@ -233,6 +233,7 @@ int usbd_ep_start_read(const uint8_t ep, uint8_t *data, uint32_t data_len) if (data_len == 0) { USBHS_DEVICE->UEP0_RX_CTRL = USBHS_EP_R_RES_ACK | USBHS_EP_R_TOG_1; } else { + USBHS_DEVICE->UEP0_DMA = (uint32_t)data; USBHS_DEVICE->UEP0_RX_CTRL = USBHS_EP_R_RES_ACK | (ep0_rx_data_toggle ? USBHS_EP_R_TOG_1 : USBHS_EP_R_TOG_0); } return 0; |
