summaryrefslogtreecommitdiff
path: root/port/ch32/ch58x/usb_ch585_usbhs_dc.c
diff options
context:
space:
mode:
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
+}