Microchip® Advanced Software Framework

freertos-8.0.1/Source/include/queue.h File Reference

Macros

#define queueOVERWRITE   ( ( BaseType_t ) 2 )
 
#define queueQUEUE_TYPE_BASE   ( ( uint8_t ) 0U )
 
#define queueQUEUE_TYPE_BINARY_SEMAPHORE   ( ( uint8_t ) 3U )
 
#define queueQUEUE_TYPE_COUNTING_SEMAPHORE   ( ( uint8_t ) 2U )
 
#define queueQUEUE_TYPE_MUTEX   ( ( uint8_t ) 1U )
 
#define queueQUEUE_TYPE_RECURSIVE_MUTEX   ( ( uint8_t ) 4U )
 
#define queueQUEUE_TYPE_SET   ( ( uint8_t ) 0U )
 
#define queueSEND_TO_BACK   ( ( BaseType_t ) 0 )
 
#define queueSEND_TO_FRONT   ( ( BaseType_t ) 1 )
 
#define xQueueAltPeek(xQueue, pvBuffer, xTicksToWait)   xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
 
#define xQueueAltReceive(xQueue, pvBuffer, xTicksToWait)   xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
 
#define xQueueAltSendToBack(xQueue, pvItemToQueue, xTicksToWait)   xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
 
#define xQueueAltSendToFront(xQueue, pvItemToQueue, xTicksToWait)   xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
 
#define xQueueCreate(uxQueueLength, uxItemSize)   xQueueGenericCreate( uxQueueLength, uxItemSize, queueQUEUE_TYPE_BASE )
 
#define xQueueOverwrite(xQueue, pvItemToQueue)   xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )
 
#define xQueueOverwriteFromISR(xQueue, pvItemToQueue, pxHigherPriorityTaskWoken)   xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )
 
#define xQueuePeek(xQueue, pvBuffer, xTicksToWait)   xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
 
#define xQueueReceive(xQueue, pvBuffer, xTicksToWait)   xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
 
#define xQueueReset(xQueue)   xQueueGenericReset( xQueue, pdFALSE )
 
#define xQueueSend(xQueue, pvItemToQueue, xTicksToWait)   xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
 
#define xQueueSendFromISR(xQueue, pvItemToQueue, pxHigherPriorityTaskWoken)   xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
 
#define xQueueSendToBack(xQueue, pvItemToQueue, xTicksToWait)   xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
 
#define xQueueSendToBackFromISR(xQueue, pvItemToQueue, pxHigherPriorityTaskWoken)   xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
 
#define xQueueSendToFront(xQueue, pvItemToQueue, xTicksToWait)   xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
 
#define xQueueSendToFrontFromISR(xQueue, pvItemToQueue, pxHigherPriorityTaskWoken)   xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )
 

Typedefs

typedef void * QueueHandle_t
 Type by which queues are referenced. More...
 
typedef void * QueueSetHandle_t
 Type by which queue sets are referenced. More...
 
typedef void * QueueSetMemberHandle_t
 Queue sets can contain both queues and semaphores, so the QueueSetMemberHandle_t is defined as a type to be used where a parameter or return value can be either an QueueHandle_t or an SemaphoreHandle_t. More...
 

Functions

uint8_t ucQueueGetQueueType (QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
UBaseType_t uxQueueGetQueueNumber (QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
UBaseType_t uxQueueMessagesWaiting (const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
UBaseType_t uxQueueMessagesWaitingFromISR (const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
UBaseType_t uxQueueSpacesAvailable (const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
void vQueueDelete (QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
void vQueueSetQueueNumber (QueueHandle_t xQueue, UBaseType_t uxQueueNumber) PRIVILEGED_FUNCTION
 
void vQueueWaitForMessageRestricted (QueueHandle_t xQueue, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
 
BaseType_t xQueueAddToSet (QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
 
BaseType_t xQueueAltGenericReceive (QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait, BaseType_t xJustPeeking)
 
BaseType_t xQueueAltGenericSend (QueueHandle_t xQueue, const void *const pvItemToQueue, TickType_t xTicksToWait, BaseType_t xCopyPosition)
 
QueueHandle_t xQueueCreateCountingSemaphore (const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount) PRIVILEGED_FUNCTION
 
QueueHandle_t xQueueCreateMutex (const uint8_t ucQueueType) PRIVILEGED_FUNCTION
 
QueueSetHandle_t xQueueCreateSet (const UBaseType_t uxEventQueueLength) PRIVILEGED_FUNCTION
 
BaseType_t xQueueCRReceive (QueueHandle_t xQueue, void *pvBuffer, TickType_t xTicksToWait)
 
BaseType_t xQueueCRReceiveFromISR (QueueHandle_t xQueue, void *pvBuffer, BaseType_t *pxTaskWoken)
 
BaseType_t xQueueCRSend (QueueHandle_t xQueue, const void *pvItemToQueue, TickType_t xTicksToWait)
 
BaseType_t xQueueCRSendFromISR (QueueHandle_t xQueue, const void *pvItemToQueue, BaseType_t xCoRoutinePreviouslyWoken)
 
QueueHandle_t xQueueGenericCreate (const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType) PRIVILEGED_FUNCTION
 
BaseType_t xQueueGenericReceive (QueueHandle_t xQueue, void *const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeek) PRIVILEGED_FUNCTION
 
BaseType_t xQueueGenericReset (QueueHandle_t xQueue, BaseType_t xNewQueue) PRIVILEGED_FUNCTION
 
BaseType_t xQueueGenericSend (QueueHandle_t xQueue, const void *const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition) PRIVILEGED_FUNCTION
 
BaseType_t xQueueGenericSendFromISR (QueueHandle_t xQueue, const void *const pvItemToQueue, BaseType_t *const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition) PRIVILEGED_FUNCTION
 
void * xQueueGetMutexHolder (QueueHandle_t xSemaphore) PRIVILEGED_FUNCTION
 
BaseType_t xQueueGiveMutexRecursive (QueueHandle_t pxMutex) PRIVILEGED_FUNCTION
 
BaseType_t xQueueIsQueueEmptyFromISR (const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
BaseType_t xQueueIsQueueFullFromISR (const QueueHandle_t xQueue) PRIVILEGED_FUNCTION
 
BaseType_t xQueuePeekFromISR (QueueHandle_t xQueue, void *const pvBuffer) PRIVILEGED_FUNCTION
 
BaseType_t xQueueReceiveFromISR (QueueHandle_t xQueue, void *const pvBuffer, BaseType_t *const pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
 
BaseType_t xQueueRemoveFromSet (QueueSetMemberHandle_t xQueueOrSemaphore, QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
 
QueueSetMemberHandle_t xQueueSelectFromSet (QueueSetHandle_t xQueueSet, const TickType_t xTicksToWait) PRIVILEGED_FUNCTION
 
QueueSetMemberHandle_t xQueueSelectFromSetFromISR (QueueSetHandle_t xQueueSet) PRIVILEGED_FUNCTION
 
BaseType_t xQueueTakeMutexRecursive (QueueHandle_t xMutex, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
 

#define queueOVERWRITE   ( ( BaseType_t ) 2 )
#define queueQUEUE_TYPE_BASE   ( ( uint8_t ) 0U )
#define queueQUEUE_TYPE_BINARY_SEMAPHORE   ( ( uint8_t ) 3U )
#define queueQUEUE_TYPE_COUNTING_SEMAPHORE   ( ( uint8_t ) 2U )
#define queueQUEUE_TYPE_MUTEX   ( ( uint8_t ) 1U )
#define queueQUEUE_TYPE_RECURSIVE_MUTEX   ( ( uint8_t ) 4U )
#define queueQUEUE_TYPE_SET   ( ( uint8_t ) 0U )
#define queueSEND_TO_BACK   ( ( BaseType_t ) 0 )
#define queueSEND_TO_FRONT   ( ( BaseType_t ) 1 )
#define xQueueAltPeek (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
#define xQueueAltReceive (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
#define xQueueAltSendToBack (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
#define xQueueAltSendToFront (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
#define xQueueCreate (   uxQueueLength,
  uxItemSize 
)    xQueueGenericCreate( uxQueueLength, uxItemSize, queueQUEUE_TYPE_BASE )
#define xQueueOverwrite (   xQueue,
  pvItemToQueue 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )
#define xQueueOverwriteFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )
#define xQueuePeek (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )
#define xQueueReceive (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )
#define xQueueReset (   xQueue)    xQueueGenericReset( xQueue, pdFALSE )
#define xQueueSend (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
#define xQueueSendFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
#define xQueueSendToBack (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
#define xQueueSendToBackFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
#define xQueueSendToFront (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )
#define xQueueSendToFrontFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )

typedef void* QueueHandle_t

Type by which queues are referenced.

For example, a call to xQueueCreate() returns an QueueHandle_t variable that can then be used as a parameter to xQueueSend(), xQueueReceive(), etc.

typedef void* QueueSetHandle_t

Type by which queue sets are referenced.

For example, a call to xQueueCreateSet() returns an xQueueSet variable that can then be used as a parameter to xQueueSelectFromSet(), xQueueAddToSet(), etc.

typedef void* QueueSetMemberHandle_t

Queue sets can contain both queues and semaphores, so the QueueSetMemberHandle_t is defined as a type to be used where a parameter or return value can be either an QueueHandle_t or an SemaphoreHandle_t.

uint8_t ucQueueGetQueueType ( QueueHandle_t  xQueue)
UBaseType_t uxQueueGetQueueNumber ( QueueHandle_t  xQueue)
UBaseType_t uxQueueMessagesWaiting ( const QueueHandle_t  xQueue)
UBaseType_t uxQueueMessagesWaitingFromISR ( const QueueHandle_t  xQueue)

References configASSERT.

UBaseType_t uxQueueSpacesAvailable ( const QueueHandle_t  xQueue)
void vQueueSetQueueNumber ( QueueHandle_t  xQueue,
UBaseType_t  uxQueueNumber 
)
void vQueueWaitForMessageRestricted ( QueueHandle_t  xQueue,
TickType_t  xTicksToWait 
)
BaseType_t xQueueAddToSet ( QueueSetMemberHandle_t  xQueueOrSemaphore,
QueueSetHandle_t  xQueueSet 
)
BaseType_t xQueueAltGenericReceive ( QueueHandle_t  xQueue,
void *const  pvBuffer,
TickType_t  xTicksToWait,
BaseType_t  xJustPeeking 
)
BaseType_t xQueueAltGenericSend ( QueueHandle_t  xQueue,
const void *const  pvItemToQueue,
TickType_t  xTicksToWait,
BaseType_t  xCopyPosition 
)
QueueHandle_t xQueueCreateCountingSemaphore ( const UBaseType_t  uxMaxCount,
const UBaseType_t  uxInitialCount 
)
QueueHandle_t xQueueCreateMutex ( const uint8_t  ucQueueType)
QueueSetHandle_t xQueueCreateSet ( const UBaseType_t  uxEventQueueLength)
BaseType_t xQueueCRReceive ( QueueHandle_t  xQueue,
void *  pvBuffer,
TickType_t  xTicksToWait 
)
BaseType_t xQueueCRReceiveFromISR ( QueueHandle_t  xQueue,
void *  pvBuffer,
BaseType_t *  pxTaskWoken 
)
BaseType_t xQueueCRSend ( QueueHandle_t  xQueue,
const void *  pvItemToQueue,
TickType_t  xTicksToWait 
)
BaseType_t xQueueCRSendFromISR ( QueueHandle_t  xQueue,
const void *  pvItemToQueue,
BaseType_t  xCoRoutinePreviouslyWoken 
)
QueueHandle_t xQueueGenericCreate ( const UBaseType_t  uxQueueLength,
const UBaseType_t  uxItemSize,
const uint8_t  ucQueueType 
)
void* xQueueGetMutexHolder ( QueueHandle_t  xSemaphore)
BaseType_t xQueueGiveMutexRecursive ( QueueHandle_t  pxMutex)
BaseType_t xQueueIsQueueEmptyFromISR ( const QueueHandle_t  xQueue)

References configASSERT, pdFALSE, and pdTRUE.

BaseType_t xQueueIsQueueFullFromISR ( const QueueHandle_t  xQueue)

References configASSERT, pdFALSE, and pdTRUE.

BaseType_t xQueueRemoveFromSet ( QueueSetMemberHandle_t  xQueueOrSemaphore,
QueueSetHandle_t  xQueueSet 
)
QueueSetMemberHandle_t xQueueSelectFromSet ( QueueSetHandle_t  xQueueSet,
const TickType_t  xTicksToWait 
)
QueueSetMemberHandle_t xQueueSelectFromSetFromISR ( QueueSetHandle_t  xQueueSet)
BaseType_t xQueueTakeMutexRecursive ( QueueHandle_t  xMutex,
TickType_t  xTicksToWait 
)