SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros | Functions
byteorder.h File Reference
#include <types.h>
Include dependency graph for byteorder.h:

Go to the source code of this file.

Macros

#define cpu_to_le64(x)   (__swab64((u64_t) (x)))
 
#define le64_to_cpu(x)   (__swab64((u64_t) (x)))
 
#define cpu_to_le32(x)   (__swab32((u32_t) (x)))
 
#define le32_to_cpu(x)   (__swab32((u32_t) (x)))
 
#define cpu_to_le16(x)   (__swab16((u16_t) (x)))
 
#define le16_to_cpu(x)   (__swab16((u16_t) (x)))
 
#define cpu_to_be64(x)   ((u64_t) (x))
 
#define be64_to_cpu(x)   ((u64_t) (x))
 
#define cpu_to_be32(x)   ((u32_t) (x))
 
#define be32_to_cpu(x)   ((u32_t) (x))
 
#define cpu_to_be16(x)   ((u16_t) (x))
 
#define be16_to_cpu(x)   ((u16_t) (x))
 

Functions

static u16_t __swab16 (u16_t x)
 
static u32_t __swab32 (u32_t x)
 
static u64_t __swab64 (u64_t x)
 
static u32_t __swahw32 (u32_t x)
 
static u32_t __swahb32 (u32_t x)
 

Macro Definition Documentation

◆ be16_to_cpu

#define be16_to_cpu (   x)    ((u16_t) (x))

◆ be32_to_cpu

#define be32_to_cpu (   x)    ((u32_t) (x))

◆ be64_to_cpu

#define be64_to_cpu (   x)    ((u64_t) (x))

◆ cpu_to_be16

#define cpu_to_be16 (   x)    ((u16_t) (x))

◆ cpu_to_be32

#define cpu_to_be32 (   x)    ((u32_t) (x))

◆ cpu_to_be64

#define cpu_to_be64 (   x)    ((u64_t) (x))

◆ cpu_to_le16

#define cpu_to_le16 (   x)    (__swab16((u16_t) (x)))

◆ cpu_to_le32

#define cpu_to_le32 (   x)    (__swab32((u32_t) (x)))

◆ cpu_to_le64

#define cpu_to_le64 (   x)    (__swab64((u64_t) (x)))

◆ le16_to_cpu

#define le16_to_cpu (   x)    (__swab16((u16_t) (x)))

◆ le32_to_cpu

#define le32_to_cpu (   x)    (__swab32((u32_t) (x)))

◆ le64_to_cpu

#define le64_to_cpu (   x)    (__swab64((u64_t) (x)))

Function Documentation

◆ __swab16()

static u16_t __swab16 ( u16_t  x)
inlinestatic

◆ __swab32()

static u32_t __swab32 ( u32_t  x)
inlinestatic

◆ __swab64()

static u64_t __swab64 ( u64_t  x)
inlinestatic

◆ __swahb32()

static u32_t __swahb32 ( u32_t  x)
inlinestatic

◆ __swahw32()

static u32_t __swahw32 ( u32_t  x)
inlinestatic