| 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
Macros | Functions
ring_buffer.c File Reference
`#include <string.h>`
`#include "ring_buffer.h"`

Go to the source code of this file.

## Macros
#define | RB_INDH(rb) ((rb)->head & ((rb)->count - 1))
#define | RB_INDT(rb) ((rb)->tail & ((rb)->count - 1))

## Functions
int | RingBuffer_Init (RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count)
| Initialize 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.

## Macro Definition Documentation

#define RB_INDH | ( |  | rb | ) | ((rb)->head & ((rb)->count - 1))

Definition at line 38 of file ring_buffer.c.

#define RB_INDT | ( |  | rb | ) | ((rb)->tail & ((rb)->count - 1))

Definition at line 39 of file ring_buffer.c.