ESOS32
ESOSOn32-bitProcessors
Files | Data Structures | Macros | Typedefs | Functions
ESOS_Circular_Buffers

Files

file  esos_cb.h
 

Data Structures

struct  __stCIRCBUFF
 

Macros

#define __ESOS_CB_FLUSH(pstCB)   (pstCB)->u16_Count = 0
 
#define __ESOS_CB_IS_EMPTY(pstCB)   ((pstCB)->u16_Count == 0)
 
#define __ESOS_CB_IS_NOT_EMPTY(pstCB)   ((pstCB)->u16_Count != 0)
 
#define __ESOS_CB_IS_FULL(pstCB)   ((pstCB)->u16_Length == (pstCB)->u16_Count)
 
#define __ESOS_CB_GET_LENGTH(pstCB)   ((pstCB)->u16_Length)
 
#define __ESOS_CB_GET_COUNT(pstCB)   ((pstCB)->u16_Count)
 
#define __ESOS_CB_GET_AVAILABLE(pstCB)   (__ESOS_CB_GET_LENGTH(pstCB)-__ESOS_CB_GET_COUNT(pstCB))
 
#define __ESOS_CB_IS_AVAILABLE_AT_LEAST(pstCB, x)   (__ESOS_CB_GET_AVAILABLE((pstCB))>=(x))
 
#define __ESOS_CB_IS_AVAILABLE_EXACTLY(pstCB, x)   (__ESOS_CB_GET_AVAILABLE((pstCB))==(x))
 
#define ESOS_TASK_WAIT_WHILE_CB_IS_EMPTY(pstCB)   ESOS_TASK_WAIT_WHILE(__ESOS_CB_IS_EMPTY((pstCB)))
 
#define ESOS_TASK_WAIT_WHILE_CB_IS_FULL(pstCB)   ESOS_TASK_WAIT_WHILE(__ESOS_CB_IS_FULL((pstCB)))
 
#define ESOS_TASK_WAIT_UNTIL_CB_HAS_AVAILABLE_AT_LEAST(pstCB, x)   ESOS_TASK_WAIT_UNTIL(__ESOS_CB_IS_AVAILABLE_AT_LEAST((pstCB),(x)))
 

Typedefs

typedef struct __stCIRCBUFF CBUFFER
 
typedef CBUFFERCBUFF_HANDLE
 

Functions

void __esos_CB_Init (CBUFFER *pst_CBuffer, uint8_t *pau8_ptr, uint16_t u16_Length)
 
void __esos_CB_WriteUINT8 (CBUFFER *pst_CBuffer, uint8_t u8_x)
 
void __esos_CB_WriteUINT16 (CBUFFER *pst_CBuffer, uint16_t u16_x)
 
void __esos_CB_WriteUINT32 (CBUFFER *pst_CBuffer, uint32_t u32_x)
 
void __esos_CB_WriteUINT8Buffer (CBUFFER *pst_CBuffer, uint8_t *pu8_x, uint16_t u16_size)
 
void __esos_CB_OverwriteUINT8 (CBUFFER *pst_CBuffer, uint8_t u8_x)
 
uint8_t __esos_CB_ReadUINT8 (CBUFFER *pst_CBuffer)
 
uint16_t __esos_CB_ReadUINT16 (CBUFFER *pst_CBuffer)
 
uint32_t __esos_CB_ReadUINT32 (CBUFFER *pst_CBuffer)
 
void __esos_CB_ReadUINT8Buffer (CBUFFER *pst_CBuffer, uint8_t *pu8_x, uint16_t u16_size)
 

Detailed Description

Typedef Documentation

◆ CBUFFER

typedef struct __stCIRCBUFF CBUFFER

structure to contain a set of descriptors about the circular buffers used to implement ESOS task mailboxes, communication buffers, etc.

Function Documentation

◆ __esos_CB_WriteUINT8()

void __esos_CB_WriteUINT8 ( CBUFFER pst_CBuffer,
uint8_t  u8_x 
)

Writes byte data to a circular buffer

Parameters
pst_CBufferpointer to structure (CBUFFER) describing the circular buffer
u8_xdata to write to the circular buffer
Note
This function ASSUMES that there is ample free space available in specified circular buffer.

Definition at line 95 of file esos_cb.c.