mass rename TUSB_CFG to CFG_TUSB
This commit is contained in:
@@ -46,62 +46,62 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// CONTROLLER CONFIGURATION
|
||||
//--------------------------------------------------------------------+
|
||||
//#define TUSB_CFG_MCU will be passed from IDE/command line for easy board/mcu switching
|
||||
//#define CFG_TUSB_MCU will be passed from IDE/command line for easy board/mcu switching
|
||||
|
||||
#define TUSB_CFG_CONTROLLER_0_MODE (TUSB_MODE_DEVICE)
|
||||
//#define TUSB_CFG_CONTROLLER_1_MODE (TUSB_MODE_DEVICE)
|
||||
#define CFG_TUSB_CONTROLLER_0_MODE (TUSB_MODE_DEVICE)
|
||||
//#define CFG_TUSB_CONTROLLER_1_MODE (TUSB_MODE_DEVICE)
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// DEVICE CONFIGURATION
|
||||
//--------------------------------------------------------------------+
|
||||
#define TUSB_CFG_DEVICE_CONTROL_ENDOINT_SIZE 64
|
||||
#define CFG_TUSB_DEVICE_CONTROL_ENDOINT_SIZE 64
|
||||
|
||||
//------------- CLASS -------------//
|
||||
#define TUSB_CFG_DEVICE_HID_KEYBOARD 1
|
||||
#define TUSB_CFG_DEVICE_HID_MOUSE 1
|
||||
#define TUSB_CFG_DEVICE_HID_GENERIC 0 // not supported yet
|
||||
#define TUSB_CFG_DEVICE_MSC 1
|
||||
#define TUSB_CFG_DEVICE_CDC 1
|
||||
#define CFG_TUSB_DEVICE_HID_KEYBOARD 1
|
||||
#define CFG_TUSB_DEVICE_HID_MOUSE 1
|
||||
#define CFG_TUSB_DEVICE_HID_GENERIC 0 // not supported yet
|
||||
#define CFG_TUSB_DEVICE_MSC 1
|
||||
#define CFG_TUSB_DEVICE_CDC 1
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// COMMON CONFIGURATION
|
||||
//--------------------------------------------------------------------+
|
||||
#define TUSB_CFG_DEBUG 2
|
||||
#define CFG_TUSB_DEBUG 2
|
||||
|
||||
//#define TUSB_CFG_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
|
||||
//#define TUSB_CFG_OS_TASK_PRIO 0 // be passed from IDE/command line for easy project switching
|
||||
//#define CFG_TUSB_OS TUSB_OS_NONE // be passed from IDE/command line for easy project switching
|
||||
//#define CFG_TUSB_OS_TASK_PRIO 0 // be passed from IDE/command line for easy project switching
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USB RAM PLACEMENT
|
||||
//--------------------------------------------------------------------+
|
||||
#ifdef __CODE_RED // compiled with lpcxpresso
|
||||
|
||||
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
|
||||
#define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(.data.$RAM2) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
|
||||
#elif TUSB_CFG_MCU == MCU_LPC175X_6X
|
||||
#define TUSB_CFG_ATTR_USBRAM // LPC17xx USB DMA can access all
|
||||
#elif (TUSB_CFG_MCU == MCU_LPC43XX)
|
||||
#define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(.data.$RAM3)
|
||||
#if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
|
||||
#define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(.data.$RAM2) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
|
||||
#elif CFG_TUSB_MCU == MCU_LPC175X_6X
|
||||
#define CFG_TUSB_ATTR_USBRAM // LPC17xx USB DMA can access all
|
||||
#elif (CFG_TUSB_MCU == MCU_LPC43XX)
|
||||
#define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(.data.$RAM3)
|
||||
#endif
|
||||
|
||||
#elif defined __CC_ARM // Compiled with Keil armcc, USBRAM_SECTION is defined in scatter files
|
||||
|
||||
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
|
||||
#define TUSB_CFG_ATTR_USBRAM ATTR_SECTION(USBRAM_SECTION) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
|
||||
#elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
|
||||
#define TUSB_CFG_ATTR_USBRAM // LPC17xx USB DMA can access all address
|
||||
#elif (TUSB_CFG_MCU == MCU_LPC43XX)
|
||||
#define TUSB_CFG_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
|
||||
#if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
|
||||
#define CFG_TUSB_ATTR_USBRAM ATTR_SECTION(USBRAM_SECTION) ATTR_ALIGNED(64) // lp11u & lp13u requires data to be 64 byte aligned
|
||||
#elif (CFG_TUSB_MCU == MCU_LPC175X_6X)
|
||||
#define CFG_TUSB_ATTR_USBRAM // LPC17xx USB DMA can access all address
|
||||
#elif (CFG_TUSB_MCU == MCU_LPC43XX)
|
||||
#define CFG_TUSB_ATTR_USBRAM // Use keil tool configure to have AHB SRAM as default memory
|
||||
#endif
|
||||
|
||||
#elif defined __ICCARM__ // compiled with IAR
|
||||
|
||||
#if (TUSB_CFG_MCU == MCU_LPC11UXX) || (TUSB_CFG_MCU == MCU_LPC13UXX)
|
||||
#define TUSB_CFG_ATTR_USBRAM _Pragma("location=\"USB_PACKET_MEMORY\"") ATTR_ALIGNED(64)
|
||||
#elif (TUSB_CFG_MCU == MCU_LPC175X_6X)
|
||||
#define TUSB_CFG_ATTR_USBRAM
|
||||
#elif (TUSB_CFG_MCU == MCU_LPC43XX)
|
||||
#define TUSB_CFG_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
|
||||
#if (CFG_TUSB_MCU == MCU_LPC11UXX) || (CFG_TUSB_MCU == MCU_LPC13UXX)
|
||||
#define CFG_TUSB_ATTR_USBRAM _Pragma("location=\"USB_PACKET_MEMORY\"") ATTR_ALIGNED(64)
|
||||
#elif (CFG_TUSB_MCU == MCU_LPC175X_6X)
|
||||
#define CFG_TUSB_ATTR_USBRAM
|
||||
#elif (CFG_TUSB_MCU == MCU_LPC43XX)
|
||||
#define CFG_TUSB_ATTR_USBRAM _Pragma("location=\".ahb_sram1\"")
|
||||
#endif
|
||||
|
||||
#else
|
||||
@@ -111,7 +111,7 @@
|
||||
#endif
|
||||
|
||||
// LPC11uxx and LPC13uxx requires each buffer has to be 64-byte alignment
|
||||
#if TUSB_CFG_MCU == MCU_LPC11UXX || TUSB_CFG_MCU == MCU_LPC13UXX
|
||||
#if CFG_TUSB_MCU == MCU_LPC11UXX || CFG_TUSB_MCU == MCU_LPC13UXX
|
||||
#define ATTR_USB_MIN_ALIGNMENT ATTR_ALIGNED(64)
|
||||
#elif defined NRF52840_XXAA
|
||||
#define ATTR_USB_MIN_ALIGNMENT ATTR_ALIGNED(4)
|
||||
|
Reference in New Issue
Block a user