Endian and Bit Macros
[Common Utility Headers - LUFA/Drivers/Common/Common.h]


Functions

static uint8_t BitReverse (uint8_t Byte) ATTR_WARN_UNUSED_RESULT ATTR_CONST
static uint16_t SwapEndian_16 (uint16_t Word) ATTR_WARN_UNUSED_RESULT ATTR_CONST
static uint32_t SwapEndian_32 (uint32_t DWord) ATTR_WARN_UNUSED_RESULT ATTR_CONST
static void SwapEndian_n (uint8_t *Data, uint8_t Bytes)

Detailed Description

Functions for swapping endianness and reversing bit orders.

Function Documentation

static uint8_t BitReverse ( uint8_t  Byte  )  [inline, static]

Function to reverse the individual bits in a byte - i.e. bit 7 is moved to bit 0, bit 6 to bit 1, etc.

Parameters:
Byte Byte of data whose bits are to be reversed

static uint16_t SwapEndian_16 ( uint16_t  Word  )  [inline, static]

Function to reverse the byte ordering of the individual bytes in a 16 bit number.

Parameters:
Word Word of data whose bytes are to be swapped

static uint32_t SwapEndian_32 ( uint32_t  DWord  )  [inline, static]

Function to reverse the byte ordering of the individual bytes in a 32 bit number.

Parameters:
DWord Double word of data whose bytes are to be swapped

static void SwapEndian_n ( uint8_t *  Data,
uint8_t  Bytes 
) [inline, static]

Function to reverse the byte ordering of the individual bytes in a n byte number.

Parameters:
Data Pointer to a number containing an even number of bytes to be reversed
Bytes Length of the data in bytes


Generated on Sun May 10 15:26:14 2009 for LUFA Library by  doxygen 1.5.7.1