summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-11 14:37:01 +0700
committerhathach <[email protected]>2018-03-11 14:37:01 +0700
commitfd250b92cb62780dee5d99b49bbcbc05080b6987 (patch)
treec2c1b22e5aab234d3a865802d3bb0a8734d28987 /tinyusb
parent3582d2301d52c88289eb76d9d98a017035d2c5d7 (diff)
clean up example
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/common/compiler/compiler_gcc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tinyusb/common/compiler/compiler_gcc.h b/tinyusb/common/compiler/compiler_gcc.h
index 9b249e4bf..681940afd 100644
--- a/tinyusb/common/compiler/compiler_gcc.h
+++ b/tinyusb/common/compiler/compiler_gcc.h
@@ -121,10 +121,10 @@
// TODO mcu specific
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-#define __n2be(x) __REV(x) ///< built-in function to convert 32-bit from native to Big Endian
-#define __be2n(x) __n2be(x) ///< built-in function to convert 32-bit from Big Endian to native
+#define __n2be(x) __builtin_bswap32(x) ///< built-in function to convert 32-bit from native to Big Endian
+#define __be2n(x) __n2be(x) ///< built-in function to convert 32-bit from Big Endian to native
-#define __n2be_16(u16) ((uint16_t) __REV16(u16))
+#define __n2be_16(u16) __builtin_bswap16(u16)
#define __be2n_16(u16) __n2be_16(u16)
#endif