summaryrefslogtreecommitdiff
path: root/port/ch32/ch58x/usb_ch585_usbhs_dc.c
diff options
context:
space:
mode:
authorRiven <[email protected]>2026-08-31 19:11:22 +0800
committersakumisu <[email protected]>2026-09-01 10:19:10 +0800
commit4b3e95217be54c92759bb12e8334b1c0baa27e20 (patch)
tree7f3553174a3babc64d9cf30c895784eda4b4fcac /port/ch32/ch58x/usb_ch585_usbhs_dc.c
parentb29725903d3397da6764120e7a5551bb4a0ef222 (diff)
fix(port): fix ch58x mps typeHEADmaster
Diffstat (limited to 'port/ch32/ch58x/usb_ch585_usbhs_dc.c')
-rw-r--r--port/ch32/ch58x/usb_ch585_usbhs_dc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/port/ch32/ch58x/usb_ch585_usbhs_dc.c b/port/ch32/ch58x/usb_ch585_usbhs_dc.c
index 2e6724c2..1f33a36d 100644
--- a/port/ch32/ch58x/usb_ch585_usbhs_dc.c
+++ b/port/ch32/ch58x/usb_ch585_usbhs_dc.c
@@ -41,7 +41,7 @@
* @brief Endpoint information structure
*/
typedef struct _usbd_ep_info {
- uint8_t mps; /* Maximum packet length of endpoint */
+ uint16_t mps; /* Maximum packet length of endpoint */
uint8_t eptype; /* Endpoint Type */
uint8_t ep_enable; /* Endpoint enable */
uint8_t *xfer_buf;
@@ -143,7 +143,7 @@ int usbd_ep_open(uint8_t busid, const struct usb_endpoint_descriptor *ep)
return -1;
}
- uint8_t mps = USB_GET_MAXPACKETSIZE(ep->wMaxPacketSize);
+ uint16_t mps = USB_GET_MAXPACKETSIZE(ep->wMaxPacketSize);
USB_SET_MAX_LEN(epid, mps);
if (USB_EP_DIR_IS_IN(ep->bEndpointAddress)) {
@@ -523,4 +523,4 @@ void USB2_DEVICE_IRQHandler(void)
{
extern void USBD_IRQHandler(uint8_t busid);
USBD_IRQHandler(0);
-} \ No newline at end of file
+}