APM:Libraries
Macros | Typedefs | Functions
sparse-endian.h File Reference
#include <byteswap.h>
#include <endian.h>
#include <stdint.h>
Include dependency graph for sparse-endian.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define __ap_bitwise
 
#define __ap_force
 
#define bswap_16_on_le(x)   __bswap_16(x)
 
#define bswap_32_on_le(x)   __bswap_32(x)
 
#define bswap_64_on_le(x)   __bswap_64(x)
 
#define bswap_16_on_be(x)   (x)
 
#define bswap_32_on_be(x)   (x)
 
#define bswap_64_on_be(x)   (x)
 

Typedefs

typedef uint16_t __ap_bitwise le16_t
 
typedef uint16_t __ap_bitwise be16_t
 
typedef uint32_t __ap_bitwise le32_t
 
typedef uint32_t __ap_bitwise be32_t
 
typedef uint64_t __ap_bitwise le64_t
 
typedef uint64_t __ap_bitwise be64_t
 

Functions

static le16_t htole16 (uint16_t value)
 
static le32_t htole32 (uint32_t value)
 
static le64_t htole64 (uint64_t value)
 
static be16_t htobe16 (uint16_t value)
 
static be32_t htobe32 (uint32_t value)
 
static be64_t htobe64 (uint64_t value)
 
static uint16_t le16toh (le16_t value)
 
static uint32_t le32toh (le32_t value)
 
static uint64_t le64toh (le64_t value)
 
static uint16_t be16toh (be16_t value)
 
static uint32_t be32toh (be32_t value)
 
static uint64_t be64toh (be64_t value)
 

Macro Definition Documentation

◆ __ap_bitwise

#define __ap_bitwise

Definition at line 31 of file sparse-endian.h.

◆ __ap_force

#define __ap_force

◆ bswap_16_on_be

#define bswap_16_on_be (   x)    (x)

Definition at line 59 of file sparse-endian.h.

Referenced by htole16(), and le16toh().

◆ bswap_16_on_le

#define bswap_16_on_le (   x)    __bswap_16(x)

Definition at line 56 of file sparse-endian.h.

Referenced by be16toh(), and htobe16().

◆ bswap_32_on_be

#define bswap_32_on_be (   x)    (x)

Definition at line 60 of file sparse-endian.h.

Referenced by htole32(), and le32toh().

◆ bswap_32_on_le

#define bswap_32_on_le (   x)    __bswap_32(x)

Definition at line 57 of file sparse-endian.h.

Referenced by be32toh(), and htobe32().

◆ bswap_64_on_be

#define bswap_64_on_be (   x)    (x)

Definition at line 61 of file sparse-endian.h.

Referenced by htole64(), and le64toh().

◆ bswap_64_on_le

#define bswap_64_on_le (   x)    __bswap_64(x)

Definition at line 58 of file sparse-endian.h.

Referenced by be64toh(), and htobe64().

Typedef Documentation

◆ be16_t

typedef uint16_t __ap_bitwise be16_t

Definition at line 36 of file sparse-endian.h.

◆ be32_t

typedef uint32_t __ap_bitwise be32_t

Definition at line 38 of file sparse-endian.h.

◆ be64_t

typedef uint64_t __ap_bitwise be64_t

Definition at line 40 of file sparse-endian.h.

◆ le16_t

typedef uint16_t __ap_bitwise le16_t

Definition at line 35 of file sparse-endian.h.

◆ le32_t

typedef uint32_t __ap_bitwise le32_t

Definition at line 37 of file sparse-endian.h.

◆ le64_t

typedef uint64_t __ap_bitwise le64_t

Definition at line 39 of file sparse-endian.h.

Function Documentation

◆ be16toh()

static uint16_t be16toh ( be16_t  value)
inlinestatic

◆ be32toh()

static uint32_t be32toh ( be32_t  value)
inlinestatic

Definition at line 84 of file sparse-endian.h.

Referenced by Linux::RCOutput_Bebop::_run_rcout().

Here is the caller graph for this function:

◆ be64toh()

static uint64_t be64toh ( be64_t  value)
inlinestatic

Definition at line 85 of file sparse-endian.h.

◆ htobe16()

static be16_t htobe16 ( uint16_t  value)
inlinestatic

Definition at line 75 of file sparse-endian.h.

Referenced by Linux::RCOutput_AeroIO::_hw_read(), Linux::RCOutput_AeroIO::_hw_write(), Linux::RCOutput_Bebop::_set_ref_speed(), AP_ADC_ADS1115::_start_conversion(), and Linux::RCOutput_Bebop::play_note().

Here is the caller graph for this function:

◆ htobe32()

static be32_t htobe32 ( uint32_t  value)
inlinestatic

Definition at line 76 of file sparse-endian.h.

◆ htobe64()

static be64_t htobe64 ( uint64_t  value)
inlinestatic

Definition at line 77 of file sparse-endian.h.

◆ htole16()

static le16_t htole16 ( uint16_t  value)
inlinestatic

Definition at line 71 of file sparse-endian.h.

◆ htole32()

static le32_t htole32 ( uint32_t  value)
inlinestatic

Definition at line 72 of file sparse-endian.h.

◆ htole64()

static le64_t htole64 ( uint64_t  value)
inlinestatic

Definition at line 73 of file sparse-endian.h.

◆ le16toh()

static uint16_t le16toh ( le16_t  value)
inlinestatic

Definition at line 79 of file sparse-endian.h.

Referenced by Linux::RCInput_SoloLink::_check_hdr(), AP_Compass_BMM150::_load_trim_values(), AP_InertialSensor_BMI160::_read_fifo(), Linux::RCInput_SoloLink::_timer_tick(), AP_Compass_BMM150::_update(), AP_Compass_IST8310::timer(), and AP_Compass_QMC5883L::timer().

Here is the caller graph for this function:

◆ le32toh()

static uint32_t le32toh ( le32_t  value)
inlinestatic

Definition at line 80 of file sparse-endian.h.

◆ le64toh()

static uint64_t le64toh ( le64_t  value)
inlinestatic

Definition at line 81 of file sparse-endian.h.