summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-06-06 10:39:37 +0700
committerhathach <[email protected]>2019-06-06 10:39:37 +0700
commit13e01c7dca1e72097be1723676b086be29d0e622 (patch)
tree699e883134aae84d54fe592346b2bb4eb92acb7c /src/portable
parent90fea785c6aa60fdfd398fee262bb06c69a010b7 (diff)
add TU_ prefix to compiler ATTR to prevent name conflict with application
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/microchip/samd21/dcd_samd21.c4
-rw-r--r--src/portable/microchip/samd51/dcd_samd51.c2
-rw-r--r--src/portable/nxp/lpc11_13_15/dcd_lpc11_13_15.c6
-rw-r--r--src/portable/nxp/lpc17_40/dcd_lpc17_40.c4
-rw-r--r--src/portable/nxp/lpc18_43/dcd_lpc18_43.c8
-rw-r--r--src/portable/st/stm32f4/dcd_stm32f4.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c
index 9a9964505..fedfa2ec9 100644
--- a/src/portable/microchip/samd21/dcd_samd21.c
+++ b/src/portable/microchip/samd21/dcd_samd21.c
@@ -34,8 +34,8 @@
/*------------------------------------------------------------------*/
/* MACRO TYPEDEF CONSTANT ENUM
*------------------------------------------------------------------*/
-static ATTR_ALIGNED(4) UsbDeviceDescBank sram_registers[8][2];
-static ATTR_ALIGNED(4) uint8_t _setup_packet[8];
+static TU_ATTR_ALIGNED(4) UsbDeviceDescBank sram_registers[8][2];
+static TU_ATTR_ALIGNED(4) uint8_t _setup_packet[8];
// Setup the control endpoint 0.
static void bus_reset(void)
diff --git a/src/portable/microchip/samd51/dcd_samd51.c b/src/portable/microchip/samd51/dcd_samd51.c
index 6a4bd0e63..a43609b9e 100644
--- a/src/portable/microchip/samd51/dcd_samd51.c
+++ b/src/portable/microchip/samd51/dcd_samd51.c
@@ -35,7 +35,7 @@
/* MACRO TYPEDEF CONSTANT ENUM
*------------------------------------------------------------------*/
static UsbDeviceDescBank sram_registers[8][2];
-static ATTR_ALIGNED(4) uint8_t _setup_packet[8];
+static TU_ATTR_ALIGNED(4) uint8_t _setup_packet[8];
// Setup the control endpoint 0.
static void bus_reset(void)
diff --git a/src/portable/nxp/lpc11_13_15/dcd_lpc11_13_15.c b/src/portable/nxp/lpc11_13_15/dcd_lpc11_13_15.c
index b63bf1feb..0dab2caf7 100644
--- a/src/portable/nxp/lpc11_13_15/dcd_lpc11_13_15.c
+++ b/src/portable/nxp/lpc11_13_15/dcd_lpc11_13_15.c
@@ -67,7 +67,7 @@ enum {
CMDSTAT_VBUS_DEBOUNCED_MASK = TU_BIT(28),
};
-typedef struct ATTR_PACKED
+typedef struct TU_ATTR_PACKED
{
// Bits 21:6 (aligned 64) used in conjunction with bit 31:22 of DATABUFSTART
volatile uint16_t buffer_offset;
@@ -101,7 +101,7 @@ typedef struct
xfer_dma_t dma[EP_COUNT];
- ATTR_ALIGNED(64) uint8_t setup_packet[8];
+ TU_ATTR_ALIGNED(64) uint8_t setup_packet[8];
}dcd_data_t;
//--------------------------------------------------------------------+
@@ -109,7 +109,7 @@ typedef struct
//--------------------------------------------------------------------+
// EP list must be 256-byte aligned
-CFG_TUSB_MEM_SECTION ATTR_ALIGNED(256) static dcd_data_t _dcd;
+CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(256) static dcd_data_t _dcd;
static inline uint16_t get_buf_offset(void const * buffer)
{
diff --git a/src/portable/nxp/lpc17_40/dcd_lpc17_40.c b/src/portable/nxp/lpc17_40/dcd_lpc17_40.c
index a14d20e30..cdc4d58db 100644
--- a/src/portable/nxp/lpc17_40/dcd_lpc17_40.c
+++ b/src/portable/nxp/lpc17_40/dcd_lpc17_40.c
@@ -37,7 +37,7 @@
//--------------------------------------------------------------------+
#define DCD_ENDPOINT_MAX 32
-typedef struct ATTR_ALIGNED(4)
+typedef struct TU_ATTR_ALIGNED(4)
{
//------------- Word 0 -------------//
uint32_t next;
@@ -91,7 +91,7 @@ typedef struct
} dcd_data_t;
-CFG_TUSB_MEM_SECTION ATTR_ALIGNED(128) static dcd_data_t _dcd;
+CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(128) static dcd_data_t _dcd;
//--------------------------------------------------------------------+
diff --git a/src/portable/nxp/lpc18_43/dcd_lpc18_43.c b/src/portable/nxp/lpc18_43/dcd_lpc18_43.c
index 89dc98ce4..049624d92 100644
--- a/src/portable/nxp/lpc18_43/dcd_lpc18_43.c
+++ b/src/portable/nxp/lpc18_43/dcd_lpc18_43.c
@@ -46,16 +46,16 @@
typedef struct {
// Must be at 2K alignment
- dcd_qhd_t qhd[QHD_MAX] ATTR_ALIGNED(64);
- dcd_qtd_t qtd[QHD_MAX] ATTR_ALIGNED(32);
+ dcd_qhd_t qhd[QHD_MAX] TU_ATTR_ALIGNED(64);
+ dcd_qtd_t qtd[QHD_MAX] TU_ATTR_ALIGNED(32);
}dcd_data_t;
#if (CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE)
-CFG_TUSB_MEM_SECTION ATTR_ALIGNED(2048) static dcd_data_t dcd_data0;
+CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(2048) static dcd_data_t dcd_data0;
#endif
#if (CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE)
-CFG_TUSB_MEM_SECTION ATTR_ALIGNED(2048) static dcd_data_t dcd_data1;
+CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(2048) static dcd_data_t dcd_data1;
#endif
static LPC_USBHS_T * const LPC_USB[2] = { LPC_USB0, LPC_USB1 };
diff --git a/src/portable/st/stm32f4/dcd_stm32f4.c b/src/portable/st/stm32f4/dcd_stm32f4.c
index f7128344d..996950ab0 100644
--- a/src/portable/st/stm32f4/dcd_stm32f4.c
+++ b/src/portable/st/stm32f4/dcd_stm32f4.c
@@ -39,7 +39,7 @@
#define IN_EP_BASE (USB_OTG_INEndpointTypeDef *) (USB_OTG_FS_PERIPH_BASE + USB_OTG_IN_ENDPOINT_BASE)
#define FIFO_BASE(_x) (uint32_t *) (USB_OTG_FS_PERIPH_BASE + USB_OTG_FIFO_BASE + (_x) * USB_OTG_FIFO_SIZE)
-static ATTR_ALIGNED(4) uint32_t _setup_packet[6];
+static TU_ATTR_ALIGNED(4) uint32_t _setup_packet[6];
static uint8_t _setup_offs; // We store up to 3 setup packets.
typedef struct {