![]() |
LPCOpen Platform for LPC112X microcontrollers
112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
|
#include "lpc_types.h"
Go to the source code of this file.
Data Structures | |
struct | RINGBUFF_T |
Ring buffer structure. More... | |
Macros | |
#define | RB_VHEAD(rb) (*(volatile uint32_t *) &(rb)->head) |
#define | RB_VTAIL(rb) (*(volatile uint32_t *) &(rb)->tail) |
Functions | |
int | RingBuffer_Init (RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count) |
Initialize ring buffer. More... | |
STATIC INLINE void | RingBuffer_Flush (RINGBUFF_T *RingBuff) |
Resets the ring buffer to empty. More... | |
STATIC INLINE int | RingBuffer_GetSize (RINGBUFF_T *RingBuff) |
Return size the ring buffer. More... | |
STATIC INLINE int | RingBuffer_GetCount (RINGBUFF_T *RingBuff) |
Return number of items in the ring buffer. More... | |
STATIC INLINE int | RingBuffer_GetFree (RINGBUFF_T *RingBuff) |
Return number of free items in the ring buffer. More... | |
STATIC INLINE int | RingBuffer_IsFull (RINGBUFF_T *RingBuff) |
Return number of items in the ring buffer. More... | |
STATIC INLINE int | RingBuffer_IsEmpty (RINGBUFF_T *RingBuff) |
Return empty status of ring buffer. More... | |
int | RingBuffer_Insert (RINGBUFF_T *RingBuff, const void *data) |
Insert a single item into ring buffer. More... | |
int | RingBuffer_InsertMult (RINGBUFF_T *RingBuff, const void *data, int num) |
Insert an array of items into ring buffer. More... | |
int | RingBuffer_Pop (RINGBUFF_T *RingBuff, void *data) |
Pop an item from the ring buffer. More... | |
int | RingBuffer_PopMult (RINGBUFF_T *RingBuff, void *data, int num) |
Pop an array of items from the ring buffer. More... | |