PebbleOS
Loading...
Searching...
No Matches
Data Structures | Functions
byteorder.h File Reference
#include <stdint.h>
#include <pbl/kernel/compiler.h>

Data Structures

struct  pbl_be16_t
 Big-endian 16-bit value, wrapped so it cannot be used without conversion. More...
 

Functions

static uint16_t pbl_be16_to_cpu (uint16_t v)
 Convert a big-endian 16-bit value to CPU order.
 
static uint16_t pbl_cpu_to_be16 (uint16_t v)
 Convert a 16-bit value in CPU order to big-endian.
 
static uint32_t pbl_be32_to_cpu (uint32_t v)
 Convert a big-endian 32-bit value to CPU order.
 
static uint32_t pbl_cpu_to_be32 (uint32_t v)
 Convert a 32-bit value in CPU order to big-endian.
 
static uint16_t pbl_le16_to_cpu (uint16_t v)
 Convert a little-endian 16-bit value to CPU order.
 
static uint16_t pbl_cpu_to_le16 (uint16_t v)
 Convert a 16-bit value in CPU order to little-endian.
 
static uint32_t pbl_le32_to_cpu (uint32_t v)
 Convert a little-endian 32-bit value to CPU order.
 
static uint32_t pbl_cpu_to_le32 (uint32_t v)
 Convert a 32-bit value in CPU order to little-endian.
 
static uint16_t pbl_be16_get (pbl_be16_t be)
 Read a wrapped big-endian 16-bit value.
 
static pbl_be16_t pbl_be16_make (uint16_t v)
 Wrap a 16-bit value as big-endian.