diff options
| author | Damien George | 2020-10-13 11:06:49 +1100 |
|---|---|---|
| committer | Damien George | 2020-10-17 15:49:16 +1100 |
| commit | 18518e26a7a92345fdcf8ad79e4c8b3a753f2d06 (patch) | |
| tree | 706f89971d1c8b262ad005f8343868700c2a4fda /ports/samd | |
| parent | 893f75546c4e65ca5b72bc7ef9b91003372c4705 (diff) | |
ports: Use correct in/out endpoint size in TUD_CDC_DESCRIPTOR.
The last argument of TUD_CDC_DESCRIPTOR() is the endpoint size (or
wMaxPacketSize), not the CDC RX buffer size (which can be larger than the
endpoint size).
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/samd')
| -rw-r--r-- | ports/samd/tusb_port.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/samd/tusb_port.c b/ports/samd/tusb_port.c index 019e3a891..f3d417f1a 100644 --- a/ports/samd/tusb_port.c +++ b/ports/samd/tusb_port.c @@ -40,6 +40,7 @@ #define USBD_CDC_EP_OUT (0x02) #define USBD_CDC_EP_IN (0x82) #define USBD_CDC_CMD_MAX_SIZE (8) +#define USBD_CDC_IN_OUT_MAX_SIZE (64) #define USBD_STR_0 (0x00) #define USBD_STR_MANUF (0x01) @@ -71,7 +72,7 @@ static const uint8_t usbd_desc_cfg[USBD_DESC_LEN] = { TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, USBD_MAX_POWER_MA), TUD_CDC_DESCRIPTOR(USBD_ITF_CDC, USBD_STR_CDC, USBD_CDC_EP_CMD, - USBD_CDC_CMD_MAX_SIZE, USBD_CDC_EP_OUT, USBD_CDC_EP_IN, CFG_TUD_CDC_RX_BUFSIZE), + USBD_CDC_CMD_MAX_SIZE, USBD_CDC_EP_OUT, USBD_CDC_EP_IN, USBD_CDC_IN_OUT_MAX_SIZE), }; static const char *const usbd_desc_str[] = { |
