FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stream_buffer.c File Reference

Data Structures

struct  StreamBuffer_t
 

Macros

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
 
#define sbRECEIVE_COMPLETED(pxStreamBuffer)
 
#define sbRECEIVE_COMPLETED_FROM_ISR(pxStreamBuffer,pxHigherPriorityTaskWoken)
 
#define sbSEND_COMPLETED(pxStreamBuffer)
 
#define sbSEND_COMPLETE_FROM_ISR(pxStreamBuffer, pxHigherPriorityTaskWoken)
 
#define sbBYTES_TO_STORE_MESSAGE_LENGTH
 
#define sbFLAGS_IS_MESSAGE_BUFFER
 
#define sbFLAGS_IS_STATICALLY_ALLOCATED
 

Functions

static size_t prvBytesInBuffer (const StreamBuffer_t *const pxStreamBuffer) PRIVILEGED_FUNCTION
 
static size_t prvWriteBytesToBuffer (StreamBuffer_t *const pxStreamBuffer, const uint8_t *pucData, size_t xCount) PRIVILEGED_FUNCTION
 
static size_t prvReadMessageFromBuffer (StreamBuffer_t *pxStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, size_t xBytesAvailable, size_t xBytesToStoreMessageLength) PRIVILEGED_FUNCTION
 
static size_t prvWriteMessageToBuffer (StreamBuffer_t *const pxStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, size_t xSpace, size_t xRequiredSpace) PRIVILEGED_FUNCTION
 
static size_t prvReadBytesFromBuffer (StreamBuffer_t *pxStreamBuffer, uint8_t *pucData, size_t xMaxCount, size_t xBytesAvailable) PRIVILEGED_FUNCTION
 
static void prvInitialiseNewStreamBuffer (StreamBuffer_t *const pxStreamBuffer, uint8_t *const pucBuffer, size_t xBufferSizeBytes, size_t xTriggerLevelBytes, uint8_t ucFlags) PRIVILEGED_FUNCTION
 
void vStreamBufferDelete (StreamBufferHandle_t xStreamBuffer)
 
BaseType_t xStreamBufferReset (StreamBufferHandle_t xStreamBuffer)
 
BaseType_t xStreamBufferSetTriggerLevel (StreamBufferHandle_t xStreamBuffer, size_t xTriggerLevel)
 
size_t xStreamBufferSpacesAvailable (StreamBufferHandle_t xStreamBuffer)
 
size_t xStreamBufferBytesAvailable (StreamBufferHandle_t xStreamBuffer)
 
size_t xStreamBufferSend (StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait)
 
size_t xStreamBufferSendFromISR (StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken)
 
size_t xStreamBufferReceive (StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait)
 
size_t xStreamBufferNextMessageLengthBytes (StreamBufferHandle_t xStreamBuffer)
 
size_t xStreamBufferReceiveFromISR (StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, BaseType_t *const pxHigherPriorityTaskWoken)
 
BaseType_t xStreamBufferIsEmpty (StreamBufferHandle_t xStreamBuffer)
 
BaseType_t xStreamBufferIsFull (StreamBufferHandle_t xStreamBuffer)
 
BaseType_t xStreamBufferSendCompletedFromISR (StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken)
 
BaseType_t xStreamBufferReceiveCompletedFromISR (StreamBufferHandle_t xStreamBuffer, BaseType_t *pxHigherPriorityTaskWoken)
 

Macro Definition Documentation

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
#define sbFLAGS_IS_STATICALLY_ALLOCATED

Referenced by vStreamBufferDelete().

#define sbRECEIVE_COMPLETED (   pxStreamBuffer)

Referenced by xStreamBufferReceive().

#define sbRECEIVE_COMPLETED_FROM_ISR (   pxStreamBuffer,
  pxHigherPriorityTaskWoken 
)
#define sbSEND_COMPLETE_FROM_ISR (   pxStreamBuffer,
  pxHigherPriorityTaskWoken 
)
#define sbSEND_COMPLETED (   pxStreamBuffer)

Referenced by xStreamBufferSend().

Function Documentation

static void prvInitialiseNewStreamBuffer ( StreamBuffer_t *const  pxStreamBuffer,
uint8_t *const  pucBuffer,
size_t  xBufferSizeBytes,
size_t  xTriggerLevelBytes,
uint8_t  ucFlags 
)
static
static size_t prvReadBytesFromBuffer ( StreamBuffer_t pxStreamBuffer,
uint8_t *  pucData,
size_t  xMaxCount,
size_t  xBytesAvailable 
)
static
static size_t prvReadMessageFromBuffer ( StreamBuffer_t pxStreamBuffer,
void *  pvRxData,
size_t  xBufferLengthBytes,
size_t  xBytesAvailable,
size_t  xBytesToStoreMessageLength 
)
static
static size_t prvWriteBytesToBuffer ( StreamBuffer_t *const  pxStreamBuffer,
const uint8_t *  pucData,
size_t  xCount 
)
static
static size_t prvWriteMessageToBuffer ( StreamBuffer_t *const  pxStreamBuffer,
const void *  pvTxData,
size_t  xDataLengthBytes,
size_t  xSpace,
size_t  xRequiredSpace 
)
static
size_t xStreamBufferBytesAvailable ( StreamBufferHandle_t  xStreamBuffer)
BaseType_t xStreamBufferIsEmpty ( StreamBufferHandle_t  xStreamBuffer)
BaseType_t xStreamBufferReceiveCompletedFromISR ( StreamBufferHandle_t  xStreamBuffer,
BaseType_t pxHigherPriorityTaskWoken 
)
size_t xStreamBufferReceiveFromISR ( StreamBufferHandle_t  xStreamBuffer,
void *  pvRxData,
size_t  xBufferLengthBytes,
BaseType_t *const  pxHigherPriorityTaskWoken 
)
BaseType_t xStreamBufferSendCompletedFromISR ( StreamBufferHandle_t  xStreamBuffer,
BaseType_t pxHigherPriorityTaskWoken 
)
BaseType_t xStreamBufferSetTriggerLevel ( StreamBufferHandle_t  xStreamBuffer,
size_t  xTriggerLevel 
)