Defines | Functions

Common.h File Reference

Common library convenience macros and functions. More...

#include <stdint.h>
#include <stdbool.h>
#include "Attributes.h"
#include "BoardTypes.h"

Defines

#define MACROS   do
#define MACROE   while (0)
#define JTAG_DEBUG_POINT()   __asm__ volatile ("NOP" ::)
#define JTAG_DEBUG_BREAK()   __asm__ volatile ("BREAK" ::)
#define JTAG_DEBUG_ASSERT(x)   MACROS{ if (!(x)) { JTAG_DEBUG_BREAK(); } }MACROE
#define STDOUT_ASSERT(x)
#define pgm_read_ptr(Addr)   (void*)pgm_read_word(Addr)
#define SWAPENDIAN_16(x)   ((((x) & 0xFF00) >> 8) | (((x) & 0x00FF) << 8))
#define SWAPENDIAN_32(x)

Functions

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

Detailed Description

This file contains macros which are common to all library elements, and which may be useful in user code. It also includes other common headers, such as Atomic.h, Attributes.h and BoardTypes.h.