Skip to content

Commit

Permalink
Add tinyUSB configuration for host mass storage
Browse files Browse the repository at this point in the history
  • Loading branch information
rechrtb committed Apr 29, 2024
1 parent a4dcc78 commit 7dd8448
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@
# endif
#endif

# if (CFG_TUSB_MCU == OPT_MCU_SAME5X)
//#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_FULL_SPEED)
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE)
# elif (CFG_TUSB_MCU == OPT_MCU_SAMX7X)
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_DEVICE | OPT_MODE_HOST)
#endif

#ifndef CFG_TUSB_OS
# define CFG_TUSB_OS OPT_OS_FREERTOS
Expand All @@ -83,6 +87,12 @@
#define CFG_TUD_MIDI (0)
#define CFG_TUD_VENDOR (0)

#define CFG_TUH_ENUMERATION_BUFSIZE 256
#define CFG_TUH_HUB (1)
#define CFG_TUH_MSC (1)
#define CFG_TUH_DEVICE_MAX (CFG_TUH_HUB ? 2 : 1)
#define CFG_TUH_MSC_MAXLUN 1

// CDC FIFO size of TX and RX
#define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 128)
#define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 128)
Expand Down

0 comments on commit 7dd8448

Please sign in to comment.