treewide: Use CONFIG_*_ENDIAN instead of __BYTE_ORDER__
In order to avoid using multiple sources of truth for the platfom's endianness, convert the in-tree code to use the (BIG|LITTLE)_ENDIAN Kconfig variables exclusively, instead of the compiler's __BYTE_ORDER__. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
f38c283c42
commit
8e4d499fa0
17 changed files with 170 additions and 241 deletions
|
@ -39,12 +39,10 @@ extern "C" {
|
|||
#define CO_USE_LEDS 1
|
||||
#endif
|
||||
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
#ifdef CONFIG_LITTLE_ENDIAN
|
||||
#define CO_LITTLE_ENDIAN
|
||||
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
#define CO_BIG_ENDIAN
|
||||
#else
|
||||
#error "Unsupported endianness"
|
||||
#define CO_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
typedef bool bool_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue