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: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
parent
09a2ee8e7f
commit
0a3264ba96
|
@ -34,7 +34,7 @@
|
||||||
#include "mp_usbd_internal.h"
|
#include "mp_usbd_internal.h"
|
||||||
|
|
||||||
#define USBD_CDC_CMD_MAX_SIZE (8)
|
#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 = {
|
const tusb_desc_device_t mp_usbd_desc_device_static = {
|
||||||
.bLength = sizeof(tusb_desc_device_t),
|
.bLength = sizeof(tusb_desc_device_t),
|
||||||
|
|
|
@ -43,7 +43,9 @@
|
||||||
#define MICROPY_HW_USB_CDC_INTERFACE_STRING "Board CDC"
|
#define MICROPY_HW_USB_CDC_INTERFACE_STRING "Board CDC"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CFG_TUSB_RHPORT0_MODE
|
||||||
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE)
|
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if MICROPY_HW_USB_CDC
|
#if MICROPY_HW_USB_CDC
|
||||||
#define CFG_TUD_CDC (1)
|
#define CFG_TUD_CDC (1)
|
||||||
|
@ -59,8 +61,8 @@
|
||||||
|
|
||||||
// CDC Configuration
|
// CDC Configuration
|
||||||
#if CFG_TUD_CDC
|
#if CFG_TUD_CDC
|
||||||
#define CFG_TUD_CDC_RX_BUFSIZE (256)
|
#define CFG_TUD_CDC_RX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256)
|
||||||
#define CFG_TUD_CDC_TX_BUFSIZE (256)
|
#define CFG_TUD_CDC_TX_BUFSIZE ((CFG_TUD_MAX_SPEED == OPT_MODE_HIGH_SPEED) ? 512 : 256)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// MSC Configuration
|
// MSC Configuration
|
||||||
|
|
Loading…
Reference in New Issue