PEController BSP v4
Board Support Package for PEController from Taraz Technologies
 
Loading...
Searching...
No Matches

Functions

static void RingBuffer_Read (ring_buffer_t *buff)
 Update the ring_buffer_t::rdIndex after single successful read.
 
static void RingBuffer_Write (ring_buffer_t *buff)
 Update the ring_buffer_t::wrIndex after single successful write.
 
static void RingBuffer_Read_Count (ring_buffer_t *buff, int count)
 Update the ring_buffer_t::rdIndex after multiple successful reads.
 
static void RingBuffer_Write_Count (ring_buffer_t *buff, int count)
 Update the ring_buffer_t::wrIndex after multiple successful writes.
 
static bool RingBuffer_IsEmpty (ring_buffer_t *buff)
 Checks if the ring buffer is empty.
 
static bool RingBuffer_IsFull (ring_buffer_t *buff)
 Checks if the ring buffer is full.
 
static int RingBuffer_NextWriteLoc (ring_buffer_t *buff)
 Get the next write location in the ring buffer.
 
static int RingBuffer_NextReadLoc (ring_buffer_t *buff)
 Get the next read location in the ring buffer.
 
static int RingBuffer_NextLoc (ring_buffer_t *buff, int index)
 Get the next index for given index in the ring buffer.
 
static void RingBuffer_Reset (ring_buffer_t *buff)
 Reset the indexes for the ring buffer.
 
static int RingBuffer_GetCountTillSize (ring_buffer_t *buff)
 Get the number of entries left till the end of the data buffer, if we consider it as a linear buffer.
 
static int RingBuffer_GetPendingReadCount (ring_buffer_t *buff)
 Get the number of available slots/entries in the ring_buffer_t.
 
static int RingBuffer_GetPendingReadCountsTillEnd (ring_buffer_t *buff)
 Get the number of available slots/entries in the ring_buffer_t without looping back to the start of the buffer.
 

Detailed Description

Function Documentation

◆ RingBuffer_GetCountTillSize()

static int RingBuffer_GetCountTillSize ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Returns
Number of entries left till end of linearized buffer.

◆ RingBuffer_GetPendingReadCount()

static int RingBuffer_GetPendingReadCount ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Returns
Number of available slots/entries in the ring_buffer_t.

◆ RingBuffer_GetPendingReadCountsTillEnd()

static int RingBuffer_GetPendingReadCountsTillEnd ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Returns
Number of available slots/entries in the ring_buffer_t in linear access mode.

◆ RingBuffer_IsEmpty()

static bool RingBuffer_IsEmpty ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Returns
bool true if empty else false.

◆ RingBuffer_IsFull()

static bool RingBuffer_IsFull ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Returns
bool true if full else false.

◆ RingBuffer_NextLoc()

static int RingBuffer_NextLoc ( ring_buffer_t buff,
int  index 
)
static
Parameters
buffPointer to the relevant ring_buffer_t.
indexInitial index.
Return values
int-next index in relevant buffer.

◆ RingBuffer_NextReadLoc()

static int RingBuffer_NextReadLoc ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Return values
int-next read location index in relevant buffer.

◆ RingBuffer_NextWriteLoc()

static int RingBuffer_NextWriteLoc ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.
Return values
int-Next write location index in relevant buffer.

◆ RingBuffer_Read()

static void RingBuffer_Read ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.

◆ RingBuffer_Read_Count()

static void RingBuffer_Read_Count ( ring_buffer_t buff,
int  count 
)
static
Parameters
buffPointer to the relevant ring_buffer_t.
countNo of reads done.

◆ RingBuffer_Reset()

static void RingBuffer_Reset ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.

◆ RingBuffer_Write()

static void RingBuffer_Write ( ring_buffer_t buff)
static
Parameters
buffPointer to the relevant ring_buffer_t.

◆ RingBuffer_Write_Count()

static void RingBuffer_Write_Count ( ring_buffer_t buff,
int  count 
)
static
Parameters
buffPointer to the relevant ring_buffer_t.
countNo of writes done.