A C++ template library for embedded applications
Designed and maintained by
Aster Consulting Ltd
Join the ETL community

Endian

Constants & utilities for endianess

____________________________________________________________________________________________________

endian


A smart enumeration defining little and big members.

etl::endian::little;
etl::endian::big;

____________________________________________________________________________________________________

endianness


Checks the endianness of the platform.
Defines operator(), value() and conversion operator that return either etl::endian::little or etl::endian::big.

____________________________________________________________________________________________________

Host to network


uint8_t  hton(uint8_t)
uint16_t hton(uint16_t)
uint32_t hton(uint32_t)
uint64_t hton(uint64_t)

____________________________________________________________________________________________________

Network to host


uint8_t  ntoh(uint8_t)
uint16_t ntoh(uint16_t)
uint32_t ntoh(uint32_t)
uint64_t ntoh(uint64_t)
endianness.h