uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
queue.h File Reference

Go to the source code of this file.

Macros

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

Typedefs

typedef void * xQueueHandle
 
typedef void * xQueueSetHandle
 
typedef void * xQueueSetMemberHandle
 

Functions

signed portBASE_TYPE xQueueGenericSend (xQueueHandle xQueue, const void *const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueuePeekFromISR (xQueueHandle xQueue, const void *const pvBuffer) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueGenericReceive (xQueueHandle xQueue, const void *const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeek) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxQueueMessagesWaiting (const xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxQueueSpacesAvailable (const xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
void vQueueDelete (xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueGenericSendFromISR (xQueueHandle xQueue, const void *const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueReceiveFromISR (xQueueHandle xQueue, const void *const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueIsQueueEmptyFromISR (const xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueIsQueueFullFromISR (const xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR (const xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueAltGenericSend (xQueueHandle xQueue, const void *const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition)
 
signed portBASE_TYPE xQueueAltGenericReceive (xQueueHandle xQueue, void *const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking)
 
signed portBASE_TYPE xQueueCRSendFromISR (xQueueHandle xQueue, const void *pvItemToQueue, signed portBASE_TYPE xCoRoutinePreviouslyWoken)
 
signed portBASE_TYPE xQueueCRReceiveFromISR (xQueueHandle xQueue, void *pvBuffer, signed portBASE_TYPE *pxTaskWoken)
 
signed portBASE_TYPE xQueueCRSend (xQueueHandle xQueue, const void *pvItemToQueue, portTickType xTicksToWait)
 
signed portBASE_TYPE xQueueCRReceive (xQueueHandle xQueue, void *pvBuffer, portTickType xTicksToWait)
 
xQueueHandle xQueueCreateMutex (unsigned char ucQueueType) PRIVILEGED_FUNCTION
 
xQueueHandle xQueueCreateCountingSemaphore (unsigned portBASE_TYPE uxCountValue, unsigned portBASE_TYPE uxInitialCount) PRIVILEGED_FUNCTION
 
void * xQueueGetMutexHolder (xQueueHandle xSemaphore) PRIVILEGED_FUNCTION
 
portBASE_TYPE xQueueTakeMutexRecursive (xQueueHandle xMutex, portTickType xBlockTime) PRIVILEGED_FUNCTION
 
portBASE_TYPE xQueueGiveMutexRecursive (xQueueHandle pxMutex) PRIVILEGED_FUNCTION
 
xQueueHandle xQueueGenericCreate (unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType) PRIVILEGED_FUNCTION
 
xQueueSetHandle xQueueCreateSet (unsigned portBASE_TYPE uxEventQueueLength) PRIVILEGED_FUNCTION
 
portBASE_TYPE xQueueAddToSet (xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet) PRIVILEGED_FUNCTION
 
portBASE_TYPE xQueueRemoveFromSet (xQueueSetMemberHandle xQueueOrSemaphore, xQueueSetHandle xQueueSet) PRIVILEGED_FUNCTION
 
xQueueSetMemberHandle xQueueSelectFromSet (xQueueSetHandle xQueueSet, portTickType xBlockTimeTicks) PRIVILEGED_FUNCTION
 
xQueueSetMemberHandle xQueueSelectFromSetFromISR (xQueueSetHandle xQueueSet) PRIVILEGED_FUNCTION
 
void vQueueWaitForMessageRestricted (xQueueHandle xQueue, portTickType xTicksToWait) PRIVILEGED_FUNCTION
 
portBASE_TYPE xQueueGenericReset (xQueueHandle xQueue, portBASE_TYPE xNewQueue) PRIVILEGED_FUNCTION
 
void vQueueSetQueueNumber (xQueueHandle xQueue, unsigned char ucQueueNumber) PRIVILEGED_FUNCTION
 
unsigned char ucQueueGetQueueNumber (xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
unsigned char ucQueueGetQueueType (xQueueHandle xQueue) PRIVILEGED_FUNCTION
 

Macro Definition Documentation

#define queueOVERWRITE   ( ( portBASE_TYPE ) 2 )

Definition at line 103 of file queue.h.

#define queueQUEUE_TYPE_BASE   ( ( unsigned char ) 0U )

Definition at line 106 of file queue.h.

#define queueQUEUE_TYPE_BINARY_SEMAPHORE   ( ( unsigned char ) 3U )

Definition at line 110 of file queue.h.

#define queueQUEUE_TYPE_COUNTING_SEMAPHORE   ( ( unsigned char ) 2U )

Definition at line 109 of file queue.h.

#define queueQUEUE_TYPE_MUTEX   ( ( unsigned char ) 1U )

Definition at line 108 of file queue.h.

#define queueQUEUE_TYPE_RECURSIVE_MUTEX   ( ( unsigned char ) 4U )

Definition at line 111 of file queue.h.

#define queueQUEUE_TYPE_SET   ( ( unsigned char ) 0U )

Definition at line 107 of file queue.h.

#define queueSEND_TO_BACK   ( ( portBASE_TYPE ) 0 )

Definition at line 101 of file queue.h.

#define queueSEND_TO_FRONT   ( ( portBASE_TYPE ) 1 )

Definition at line 102 of file queue.h.

#define xQueueAltPeek (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )

Definition at line 1454 of file queue.h.

#define xQueueAltReceive (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueAltGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )

Definition at line 1453 of file queue.h.

#define xQueueAltSendToBack (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

Definition at line 1452 of file queue.h.

#define xQueueAltSendToFront (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueAltGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )

Definition at line 1451 of file queue.h.

#define xQueueCreate (   uxQueueLength,
  uxItemSize 
)    xQueueGenericCreate( uxQueueLength, uxItemSize, queueQUEUE_TYPE_BASE )

Definition at line 169 of file queue.h.

#define xQueueOverwrite (   xQueue,
  pvItemToQueue 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), 0, queueOVERWRITE )

Definition at line 500 of file queue.h.

#define xQueueOverwriteFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueOVERWRITE )

Definition at line 1183 of file queue.h.

#define xQueuePeek (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdTRUE )

Definition at line 684 of file queue.h.

#define xQueueReceive (   xQueue,
  pvBuffer,
  xTicksToWait 
)    xQueueGenericReceive( ( xQueue ), ( pvBuffer ), ( xTicksToWait ), pdFALSE )

Definition at line 810 of file queue.h.

#define xQueueReset (   xQueue)    xQueueGenericReset( xQueue, pdFALSE )

Definition at line 1492 of file queue.h.

#define xQueueSend (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

Definition at line 417 of file queue.h.

#define xQueueSendFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

Definition at line 1257 of file queue.h.

#define xQueueSendToBack (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )

Definition at line 333 of file queue.h.

#define xQueueSendToBackFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

Definition at line 1096 of file queue.h.

#define xQueueSendToFront (   xQueue,
  pvItemToQueue,
  xTicksToWait 
)    xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_FRONT )

Definition at line 251 of file queue.h.

#define xQueueSendToFrontFromISR (   xQueue,
  pvItemToQueue,
  pxHigherPriorityTaskWoken 
)    xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_FRONT )

Definition at line 1025 of file queue.h.

Typedef Documentation

typedef void* xQueueHandle

Type by which queues are referenced. For example, a call to xQueueCreate() returns an xQueueHandle variable that can then be used as a parameter to xQueueSend(), xQueueReceive(), etc.

Definition at line 84 of file queue.h.

typedef void* xQueueSetHandle

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.

Definition at line 91 of file queue.h.

typedef void* xQueueSetMemberHandle

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

Definition at line 98 of file queue.h.

Function Documentation

unsigned char ucQueueGetQueueNumber ( xQueueHandle  xQueue)
unsigned char ucQueueGetQueueType ( xQueueHandle  xQueue)
unsigned portBASE_TYPE uxQueueMessagesWaiting ( const xQueueHandle  xQueue)

Definition at line 1319 of file queue.c.

unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR ( const xQueueHandle  xQueue)

Definition at line 1349 of file queue.c.

unsigned portBASE_TYPE uxQueueSpacesAvailable ( const xQueueHandle  xQueue)

Definition at line 1333 of file queue.c.

void vQueueDelete ( xQueueHandle  xQueue)

Definition at line 1361 of file queue.c.

void vQueueSetQueueNumber ( xQueueHandle  xQueue,
unsigned char  ucQueueNumber 
)
void vQueueWaitForMessageRestricted ( xQueueHandle  xQueue,
portTickType  xTicksToWait 
)
portBASE_TYPE xQueueAddToSet ( xQueueSetMemberHandle  xQueueOrSemaphore,
xQueueSetHandle  xQueueSet 
)
signed portBASE_TYPE xQueueAltGenericReceive ( xQueueHandle  xQueue,
void *const  pvBuffer,
portTickType  xTicksToWait,
portBASE_TYPE  xJustPeeking 
)
signed portBASE_TYPE xQueueAltGenericSend ( xQueueHandle  xQueue,
const void *const  pvItemToQueue,
portTickType  xTicksToWait,
portBASE_TYPE  xCopyPosition 
)
xQueueHandle xQueueCreateCountingSemaphore ( unsigned portBASE_TYPE  uxCountValue,
unsigned portBASE_TYPE  uxInitialCount 
)
xQueueHandle xQueueCreateMutex ( unsigned char  ucQueueType)
xQueueSetHandle xQueueCreateSet ( unsigned portBASE_TYPE  uxEventQueueLength)
signed portBASE_TYPE xQueueCRReceive ( xQueueHandle  xQueue,
void *  pvBuffer,
portTickType  xTicksToWait 
)
signed portBASE_TYPE xQueueCRReceiveFromISR ( xQueueHandle  xQueue,
void *  pvBuffer,
signed portBASE_TYPE pxTaskWoken 
)
signed portBASE_TYPE xQueueCRSend ( xQueueHandle  xQueue,
const void *  pvItemToQueue,
portTickType  xTicksToWait 
)
signed portBASE_TYPE xQueueCRSendFromISR ( xQueueHandle  xQueue,
const void *  pvItemToQueue,
signed portBASE_TYPE  xCoRoutinePreviouslyWoken 
)
xQueueHandle xQueueGenericCreate ( unsigned portBASE_TYPE  uxQueueLength,
unsigned portBASE_TYPE  uxItemSize,
unsigned char  ucQueueType 
)

Definition at line 284 of file queue.c.

signed portBASE_TYPE xQueueGenericReceive ( xQueueHandle  xQueue,
const void *const  pvBuffer,
portTickType  xTicksToWait,
portBASE_TYPE  xJustPeek 
)

Definition at line 1036 of file queue.c.

portBASE_TYPE xQueueGenericReset ( xQueueHandle  xQueue,
portBASE_TYPE  xNewQueue 
)

Definition at line 239 of file queue.c.

signed portBASE_TYPE xQueueGenericSend ( xQueueHandle  xQueue,
const void *const  pvItemToQueue,
portTickType  xTicksToWait,
portBASE_TYPE  xCopyPosition 
)

Definition at line 554 of file queue.c.

signed portBASE_TYPE xQueueGenericSendFromISR ( xQueueHandle  xQueue,
const void *const  pvItemToQueue,
signed portBASE_TYPE pxHigherPriorityTaskWoken,
portBASE_TYPE  xCopyPosition 
)

Definition at line 924 of file queue.c.

void* xQueueGetMutexHolder ( xQueueHandle  xSemaphore)
portBASE_TYPE xQueueGiveMutexRecursive ( xQueueHandle  pxMutex)
signed portBASE_TYPE xQueueIsQueueEmptyFromISR ( const xQueueHandle  xQueue)

Definition at line 1592 of file queue.c.

signed portBASE_TYPE xQueueIsQueueFullFromISR ( const xQueueHandle  xQueue)

Definition at line 1631 of file queue.c.

signed portBASE_TYPE xQueuePeekFromISR ( xQueueHandle  xQueue,
const void *const  pvBuffer 
)

Definition at line 1266 of file queue.c.

signed portBASE_TYPE xQueueReceiveFromISR ( xQueueHandle  xQueue,
const void *const  pvBuffer,
signed portBASE_TYPE pxHigherPriorityTaskWoken 
)

Definition at line 1191 of file queue.c.

portBASE_TYPE xQueueRemoveFromSet ( xQueueSetMemberHandle  xQueueOrSemaphore,
xQueueSetHandle  xQueueSet 
)
xQueueSetMemberHandle xQueueSelectFromSet ( xQueueSetHandle  xQueueSet,
portTickType  xBlockTimeTicks 
)
xQueueSetMemberHandle xQueueSelectFromSetFromISR ( xQueueSetHandle  xQueueSet)
portBASE_TYPE xQueueTakeMutexRecursive ( xQueueHandle  xMutex,
portTickType  xBlockTime 
)