Defines | Functions

# byteordering.h File Reference

Byte-order handling header (license: GPLv2 or LGPLv2.1). More...

## Defines
#define | HTOL16(val)
| Converts a 16-bit integer from host byte order to little-endian byte order.
#define | HTOL32(val)
| Converts a 32-bit integer from host byte order to little-endian byte order.
#define | LTOH16(val)
| Converts a 16-bit integer from little-endian byte order to host byte order.
#define | LTOH32(val)
| Converts a 32-bit integer from little-endian byte order to host byte order.
## Functions
uint16_t | htol16 (uint16_t h)
| Converts a 16-bit integer from host byte order to little-endian byte order.
uint32_t | htol32 (uint32_t h)
| Converts a 32-bit integer from host byte order to little-endian byte order.
uint16_t | ltoh16 (uint16_t l)
| Converts a 16-bit integer from little-endian byte order to host byte order.
uint32_t | ltoh32 (uint32_t l)
| Converts a 32-bit integer from little-endian byte order to host byte order.
uint16_t | read16 (const uint8_t *p)
| Reads a 16-bit integer from memory in little-endian byte order.
uint32_t | read32 (const uint8_t *p)
| Reads a 32-bit integer from memory in little-endian byte order.
void | write16 (uint8_t *p, uint16_t i)
| Writes a 16-bit integer into memory in little-endian byte order.
void | write32 (uint8_t *p, uint32_t i)
| Writes a 32-bit integer into memory in little-endian byte order.

## Detailed Description

Byte-order handling header (license: GPLv2 or LGPLv2.1).

Author:
  Roland Riegel