mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Automatically detect native endianness for IAR compiler platform. (#612)
* Auto detect native endianness for IAR compiler platform. References: - [IAR C/C++ Development Guide Compiling and Linking for Arm Limited’s **Arm**® Cores](https://wwwfiles.iar.com/arm/webic/doc/ewarm_developmentguide.enu.pdf) - [IAR C/C++ Compiler User Guide for Microchip Technology’s **AVR** Microcontroller Family](https://wwwfiles.iar.com/AVR/webic/doc/EWAVR_CompilerGuide.pdf) * Fix spelling mistake.
This commit is contained in:
parent
6ac2087368
commit
804a401a6e
@ -42,9 +42,17 @@ SOFTWARE.
|
||||
#endif
|
||||
|
||||
///\defgroup endian endian
|
||||
/// Constants & utilities for endianess
|
||||
/// Constants & utilities for endianness
|
||||
///\ingroup utilities
|
||||
|
||||
#if !defined(ETL_ENDIAN_NATIVE) && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
|
||||
#if __LITTLE_ENDIAN__ == 1
|
||||
#define ETL_ENDIAN_NATIVE 0
|
||||
#elif __LITTLE_ENDIAN__ == 0
|
||||
#define ETL_ENDIAN_NATIVE 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Have we not already defined ETL_ENDIAN_NATIVE?
|
||||
#if !defined(ETL_ENDIAN_NATIVE)
|
||||
// Can we use the C++20 definitions?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user