| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ring_buffer.h File Reference
`#include "lpc_types.h"`

Go to the source code of this file.

## Data Structures
struct | RINGBUFF_T
| Ring buffer structure. More...

## Macros
#define | RB_SIGNATURE 0x51DEF00D
#define | RB_VHEAD(rb) (*(volatile uint32_t *) &(rb)->head)
#define | RB_VTAIL(rb) (*(volatile uint32_t *) &(rb)->tail)
#define | RingBuffer_IsValid(rb) ((rb)->valid == RB_SIGNATURE)

## Functions
int | RingBuffer_Init (RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count)
| Initialize ring buffer.
STATIC INLINE void | RingBuffer_Flush (RINGBUFF_T *RingBuff)
| Resets the ring buffer to empty.
STATIC INLINE int | RingBuffer_GetSize (RINGBUFF_T *RingBuff)
| Return size the ring buffer.
STATIC INLINE int | RingBuffer_GetCount (RINGBUFF_T *RingBuff)
| Return number of items in the ring buffer.
STATIC INLINE int | RingBuffer_GetFree (RINGBUFF_T *RingBuff)
| Return number of free items in the ring buffer.
STATIC INLINE int | RingBuffer_IsFull (RINGBUFF_T *RingBuff)
| Return number of items in the ring buffer.
STATIC INLINE int | RingBuffer_IsEmpty (RINGBUFF_T *RingBuff)
| Return empty status of ring buffer.
int | RingBuffer_Insert (RINGBUFF_T *RingBuff, const void *data)
| Insert a single item into ring buffer.
int | RingBuffer_InsertMult (RINGBUFF_T *RingBuff, const void *data, int num)
| Insert an array of items into ring buffer.
int | RingBuffer_Pop (RINGBUFF_T *RingBuff, void *data)
| Pop an item from the ring buffer.
int | RingBuffer_PopMult (RINGBUFF_T *RingBuff, void *data, int num)
| Pop an array of items from the ring buffer.