hexo/endian.h header reference
[Hardware abstraction layer module]

The source code of this header can be browsed online.

Description [link] 

Non-aligned memory access [link] 

Non-aligned memory access is provided through various functions. Three flavors of accesses are provided:

  • native CPU endianness accesses,

  • little-endian accesses,

  • big-endian accesses.

Depending on CPU module configuration and headers, each operation is implemented through dedicated assembly routine, native access or byte-based access.

CONFIG_CPU_NONALIGNED_ACCESS

Members [link] 

Functions [link] 

Macros [link] 

Members detail [link] 

#define ENDIAN_BITFIELD(...) [link] 

This macro is declared in hexo/endian.h source file, line 218.

Endian dependent bitfield declaration macro.

Bitfield can be declared trough the ENDIAN_BITFIELD macro in the direct (big endian) order. Bitfield declaration order will be swaped on little endian machines. See example below:

struct my_data_s
{
ENDIAN_BITFIELD(uint32_t a:8,
uint32_t b:8,
uint32_t c:16
);

ENDIAN_BITFIELD(uint32_t d:16,
uint32_t e:16
);
};

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define ENDIAN_BITFIELD(...) [link] 

This macro is declared in hexo/endian.h source file, line 220.

Endian dependent bitfield declaration macro.

Bitfield can be declared trough the ENDIAN_BITFIELD macro in the direct (big endian) order. Bitfield declaration order will be swaped on little endian machines. See example below:

struct my_data_s
{
ENDIAN_BITFIELD(uint32_t a:8,
uint32_t b:8,
uint32_t c:16
);

ENDIAN_BITFIELD(uint32_t d:16,
uint32_t e:16
);
};

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

#define __ENDIAN_H_ [link] 

This macro is declared in hexo/endian.h source file, line 47.

#define __ENDIAN_SWAP16(x) [link] 

This macro is declared in hexo/endian.h source file, line 73.

#define __ENDIAN_SWAP32(x) [link] 

This macro is declared in hexo/endian.h source file, line 90.

#define __ENDIAN_SWAP64(x) [link] 

This macro is declared in hexo/endian.h source file, line 124.

uint16_t endian_16_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 236.

this function loads a 16-bit value stored at arbitrary address from memory with native CPU endianness.

Parameter list:

  • addr: Address pointing a 16-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_16_na_store(void *addr, uint16_t val) [link] 

This function is declared in hexo/endian.h source file, line 311.

this function stores a 16-bit value at arbitrary address to memory with native CPU endianness.

Parameter list:

  • addr: Address to store 16-bit value at
  • val: Value to store

See also Non-aligned memory access.

uint32_t endian_32_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 261.

this function loads a 32-bit value stored at arbitrary address from memory with native CPU endianness.

Parameter list:

  • addr: Address pointing a 32-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_32_na_store(void *addr, uint32_t val) [link] 

This function is declared in hexo/endian.h source file, line 338.

this function stores a 32-bit value at arbitrary address to memory with native CPU endianness.

Parameter list:

  • addr: Address to store 32-bit value at
  • val: Value to store

See also Non-aligned memory access.

uint64_t endian_64_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 286.

this function loads a 64-bit value stored at arbitrary address from memory with native CPU endianness.

Parameter list:

  • addr: Address pointing a 64-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_64_na_store(void *addr, uint64_t val) [link] 

This function is declared in hexo/endian.h source file, line 365.

this function stores a 64-bit value at arbitrary address to memory with native CPU endianness.

Parameter list:

  • addr: Address to store 64-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_be16(x) [link] 

This macro is declared in hexo/endian.h source file, line 148.

this macro reads a big endian 16 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_be16(x) [link] 

This macro is declared in hexo/endian.h source file, line 169.

this macro reads a little endian 16 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint16_t endian_be16_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 500.

this function loads a 16-bit big-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 16-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_be16_na_store(void *addr, uint16_t val) [link] 

This function is declared in hexo/endian.h source file, line 554.

this function stores a 16-bit value to memory using big-endian representation.

Parameter list:

  • addr: Address to store 16-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_be32(x) [link] 

This macro is declared in hexo/endian.h source file, line 150.

this macro reads a big endian 32 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_be32(x) [link] 

This macro is declared in hexo/endian.h source file, line 171.

this macro reads a little endian 32 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint32_t endian_be32_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 518.

this function loads a 32-bit big-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 32-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_be32_na_store(void *addr, uint32_t val) [link] 

This function is declared in hexo/endian.h source file, line 572.

this function stores a 32-bit value to memory using big-endian representation.

Parameter list:

  • addr: Address to store 32-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_be64(x) [link] 

This macro is declared in hexo/endian.h source file, line 152.

this macro reads a big endian 64 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_be64(x) [link] 

This macro is declared in hexo/endian.h source file, line 173.

this macro reads a little endian 64 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint64_t endian_be64_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 536.

this function loads a 64-bit big-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 64-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_be64_na_store(void *addr, uint64_t val) [link] 

This function is declared in hexo/endian.h source file, line 590.

this function stores a 64-bit value to memory using big-endian representation.

Parameter list:

  • addr: Address to store 64-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_le16(x) [link] 

This macro is declared in hexo/endian.h source file, line 154.

this macro reads a little endian 16 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_le16(x) [link] 

This macro is declared in hexo/endian.h source file, line 163.

this macro reads a big endian 16 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint16_t endian_le16_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 392.

this function loads a 16-bit little-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 16-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_le16_na_store(void *addr, uint16_t val) [link] 

This function is declared in hexo/endian.h source file, line 446.

this function stores a 16-bit value to memory using little-endian representation.

Parameter list:

  • addr: Address to store 16-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_le32(x) [link] 

This macro is declared in hexo/endian.h source file, line 156.

this macro reads a little endian 32 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_le32(x) [link] 

This macro is declared in hexo/endian.h source file, line 165.

this macro reads a big endian 32 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint32_t endian_le32_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 410.

this function loads a 32-bit little-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 32-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_le32_na_store(void *addr, uint32_t val) [link] 

This function is declared in hexo/endian.h source file, line 464.

this function stores a 32-bit value to memory using little-endian representation.

Parameter list:

  • addr: Address to store 32-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_le64(x) [link] 

This macro is declared in hexo/endian.h source file, line 158.

this macro reads a little endian 64 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_CPU_ENDIAN_BIG )

#define endian_le64(x) [link] 

This macro is declared in hexo/endian.h source file, line 167.

this macro reads a big endian 64 bits value

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_CPU_ENDIAN_BIG ) and defined( CONFIG_CPU_ENDIAN_LITTLE )

uint64_t endian_le64_na_load(const void *addr) [link] 

This function is declared in hexo/endian.h source file, line 428.

this function loads a 64-bit little-endian value stored at arbitrary address from memory.

Parameter list:

  • addr: Address pointing a 64-bit value

The return value is Value at address

See also Non-aligned memory access.

void endian_le64_na_store(void *addr, uint64_t val) [link] 

This function is declared in hexo/endian.h source file, line 482.

this function stores a 64-bit value to memory using little-endian representation.

Parameter list:

  • addr: Address to store 64-bit value at
  • val: Value to store

See also Non-aligned memory access.

#define endian_swap16(x) [link] 

This macro is declared in hexo/endian.h source file, line 78.

this macro swaps bytes in 16 bits value

Alternate declarations with same identifier: [1], [2].

#define endian_swap16(x) [link] 

This macro is declared in hexo/endian.h source file, line 83.

Documentation from alternate declaration:

this macro swaps bytes in 16 bits value

Alternate declarations with same identifier: [1], [2].

#define endian_swap32(x) [link] 

This macro is declared in hexo/endian.h source file, line 105.

this macro swaps bytes in 32 bits value

Alternate declarations with same identifier: [1], [2].

#define endian_swap32(x) [link] 

This macro is declared in hexo/endian.h source file, line 110.

Documentation from alternate declaration:

this macro swaps bytes in 32 bits value

Alternate declarations with same identifier: [1], [2].

#define endian_swap64(x) [link] 

This macro is declared in hexo/endian.h source file, line 130.

this macro swaps bytes in 64 bits value

Alternate declarations with same identifier: [1], [2].

#define endian_swap64(x) [link] 

This macro is declared in hexo/endian.h source file, line 135.

Documentation from alternate declaration:

this macro swaps bytes in 64 bits value

Alternate declarations with same identifier: [1], [2].

#define __ENDIAN_ARGS(b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, ...) [link] 

This macro is declared in hexo/endian.h source file, line 191.

This macro is for internal use only.

#define __ENDIAN_REVERSE_ARGS(b01, b02, b03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, ...) [link] 

This macro is declared in hexo/endian.h source file, line 187.

This macro is for internal use only.

uint16_t __endian_swap16(uint16_t x) [link] 

This function is declared in hexo/endian.h source file, line 70.

This function is for internal use only.

uint32_t __endian_swap32(uint32_t x) [link] 

This function is declared in hexo/endian.h source file, line 97.

This function is for internal use only.

uint64_t __endian_swap64(uint64_t x) [link] 

This function is declared in hexo/endian.h source file, line 120.

This function is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc