Commit 0a3264ba authored by iabdalkader's avatar iabdalkader Committed by Damien George

shared/tinyusb: Support HS endpoint sizes.

Set buffer and endpoint sizes to 512 if the device is configured as a High
Speed device.
Signed-off-by: default avatariabdalkader <i.abdalkader@gmail.com>
parent 09a2ee8e
......@@ -34,7 +34,7 @@
#include "mp_usbd_internal.h"
#define USBD_CDC_CMD_MAX_SIZE (8)
#define USBD_CDC_IN_OUT_MAX_SIZE (64)
#define USBD_CDC_IN_OUT_MAX_SIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 64)
const tusb_desc_device_t mp_usbd_desc_device_static = {
.bLength = sizeof(tusb_desc_device_t),
......
......@@ -43,7 +43,9 @@
#define MICROPY_HW_USB_CDC_INTERFACE_STRING "Board CDC"
#endif
#ifndef CFG_TUSB_RHPORT0_MODE
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE)
#endif
#if MICROPY_HW_USB_CDC
#define CFG_TUD_CDC (1)
......@@ -59,8 +61,8 @@
// CDC Configuration
#if CFG_TUD_CDC
#define CFG_TUD_CDC_RX_BUFSIZE (256)
#define CFG_TUD_CDC_TX_BUFSIZE (256)
#define CFG_TUD_CDC_RX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256)
#define CFG_TUD_CDC_TX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256)
#endif
// MSC Configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment