Skip to content

Commit

Permalink
shared/tinyusb: Improve configuration for high speed usb.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leech <[email protected]>
  • Loading branch information
pi-anl committed Aug 23, 2024
1 parent 5fbc654 commit 3ce7dbc
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion shared/tinyusb/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,25 @@
#define MICROPY_HW_USB_MSC_INQUIRY_REVISION_STRING "1.00"
#endif

#if MICROPY_HW_USB_HS
#define OPT_MODE_PORT_SPEED OPT_MODE_HIGH_SPEED
#else
#define OPT_MODE_PORT_SPEED OPT_MODE_FULL_SPEED
#endif

#ifndef BOARD_DEVICE_RHPORT_NUM
#define BOARD_DEVICE_RHPORT_NUM 0
#endif

#ifndef BOARD_DEVICE_RHPORT_SPEED
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_PORT_SPEED
#endif
#ifndef CFG_TUD_MAX_SPEED
#define CFG_TUD_MAX_SPEED OPT_MODE_PORT_SPEED
#endif

#ifndef CFG_TUSB_RHPORT0_MODE
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE)
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | BOARD_DEVICE_RHPORT_SPEED)
#endif

#if MICROPY_HW_USB_CDC
Expand Down

0 comments on commit 3ce7dbc

Please sign in to comment.