diff --git a/src/tusb_config.h b/src/tusb_config.h index ef71d48..9f00af6 100644 --- a/src/tusb_config.h +++ b/src/tusb_config.h @@ -43,7 +43,7 @@ */ #ifndef CFG_TUSB_MCU -# if defined(__SAME54P20A__) +# if defined(__SAME54P20A__) || defined(__SAME51N19A__) # define CFG_TUSB_MCU OPT_MCU_SAME5X # define CFG_TUSB_MEM_SECTION /* nothing */ # define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4))) @@ -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 @@ -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)