summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-07-22 22:10:48 +0700
committerhathach <[email protected]>2021-07-22 22:10:48 +0700
commit15112fdbba8cf4e9ad0d99fafd8b40f07f29fb6d (patch)
tree3c810384e7c872d6f36231330ac816dab69f5fe5 /src/common
parent8cd23489d518e96594850207c91dfeefb6d6fb05 (diff)
clean up compiler
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_compiler.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/common/tusb_compiler.h b/src/common/tusb_compiler.h
index 820782d65..d3adbbc2d 100644
--- a/src/common/tusb_compiler.h
+++ b/src/common/tusb_compiler.h
@@ -81,7 +81,6 @@
#define TU_ATTR_PACKED_BEGIN
#define TU_ATTR_PACKED_END
-
#define TU_ATTR_BIT_FIELD_ORDER_BEGIN
#define TU_ATTR_BIT_FIELD_ORDER_END
@@ -109,6 +108,11 @@
#define TU_ATTR_UNUSED __attribute__ ((unused)) // Function/Variable is meant to be possibly unused
#define TU_ATTR_USED __attribute__ ((used))
+ #define TU_ATTR_PACKED_BEGIN
+ #define TU_ATTR_PACKED_END
+ #define TU_ATTR_BIT_FIELD_ORDER_BEGIN
+ #define TU_ATTR_BIT_FIELD_ORDER_END
+
// __BYTE_ORDER is defined in the TI ARM compiler, but not MSP430 (which is little endian)
#if ((__BYTE_ORDER__) == (__ORDER_LITTLE_ENDIAN__)) || defined(__MSP430__)
#define TU_BYTE_ORDER TU_LITTLE_ENDIAN
@@ -130,6 +134,11 @@
#define TU_ATTR_UNUSED __attribute__ ((unused)) // Function/Variable is meant to be possibly unused
#define TU_ATTR_USED __attribute__ ((used)) // Function/Variable is meant to be used
+ #define TU_ATTR_PACKED_BEGIN
+ #define TU_ATTR_PACKED_END
+ #define TU_ATTR_BIT_FIELD_ORDER_BEGIN
+ #define TU_ATTR_BIT_FIELD_ORDER_END
+
// Endian conversion use well-known host to network (big endian) naming
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define TU_BYTE_ORDER TU_LITTLE_ENDIAN
@@ -150,11 +159,10 @@
#define TU_ATTR_UNUSED
#define TU_ATTR_USED
- #define TU_ATTR_PACKED_BEGIN _Pragma("pack")
- #define TU_ATTR_PACKED_END _Pragma("packoption")
-
+ #define TU_ATTR_PACKED_BEGIN _Pragma("pack")
+ #define TU_ATTR_PACKED_END _Pragma("packoption")
#define TU_ATTR_BIT_FIELD_ORDER_BEGIN _Pragma("bit_order right")
- #define TU_ATTR_BIT_FIELD_ORDER_END _Pragma("bit_order")
+ #define TU_ATTR_BIT_FIELD_ORDER_END _Pragma("bit_order")
// Endian conversion use well-known host to network (big endian) naming
#if defined(__LIT)