uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
queue.c File Reference
#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "croutine.h"

Go to the source code of this file.

Classes

struct  QueueDefinition
 

Macros

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
 
#define queueUNLOCKED   ( ( signed portBASE_TYPE ) -1 )
 
#define queueLOCKED_UNMODIFIED   ( ( signed portBASE_TYPE ) 0 )
 
#define queueERRONEOUS_UNBLOCK   ( -1 )
 
#define queueSEND_TO_BACK   ( 0 )
 
#define queueSEND_TO_FRONT   ( 1 )
 
#define pxMutexHolder   pcTail
 
#define uxQueueType   pcHead
 
#define uxRecursiveCallCount   pcReadFrom
 
#define queueQUEUE_IS_MUTEX   NULL
 
#define queueSEMAPHORE_QUEUE_ITEM_LENGTH   ( 0 )
 
#define queueDONT_BLOCK   ( ( portTickType ) 0 )
 
#define queueMUTEX_GIVE_BLOCK_TIME   ( ( portTickType ) 0 )
 
#define prvLockQueue(pxQueue)
 

Typedefs

typedef struct QueueDefinition xQUEUE
 
typedef xQUEUExQueueHandle
 

Functions

xQueueHandle xQueueCreate (unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueGenericSend (xQueueHandle xQueue, const void *const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition) PRIVILEGED_FUNCTION
 
unsigned portBASE_TYPE uxQueueMessagesWaiting (const xQueueHandle pxQueue) PRIVILEGED_FUNCTION
 
void vQueueDelete (xQueueHandle xQueue) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueGenericSendFromISR (xQueueHandle pxQueue, const void *const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueGenericReceive (xQueueHandle pxQueue, void *const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking) PRIVILEGED_FUNCTION
 
signed portBASE_TYPE xQueueReceiveFromISR (xQueueHandle pxQueue, void *const pvBuffer, signed portBASE_TYPE *pxTaskWoken) PRIVILEGED_FUNCTION
 
xQueueHandle xQueueCreateMutex (void)
 
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR (const xQueueHandle pxQueue)
 
signed portBASE_TYPE xQueueIsQueueEmptyFromISR (const xQueueHandle pxQueue)
 
signed portBASE_TYPE xQueueIsQueueFullFromISR (const xQueueHandle pxQueue)
 

Macro Definition Documentation

#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

Definition at line 60 of file queue.c.

#define prvLockQueue (   pxQueue)
Value:
{ \
taskENTER_CRITICAL(); \
{ \
if( pxQueue->xRxLock == queueUNLOCKED ) \
{ \
pxQueue->xRxLock = queueLOCKED_UNMODIFIED; \
} \
if( pxQueue->xTxLock == queueUNLOCKED ) \
{ \
pxQueue->xTxLock = queueLOCKED_UNMODIFIED; \
} \
} \
taskEXIT_CRITICAL(); \
}
#define pxMutexHolder   pcTail

Definition at line 83 of file queue.c.

#define queueDONT_BLOCK   ( ( portTickType ) 0 )

Definition at line 91 of file queue.c.

#define queueERRONEOUS_UNBLOCK   ( -1 )

Definition at line 76 of file queue.c.

#define queueLOCKED_UNMODIFIED   ( ( signed portBASE_TYPE ) 0 )

Definition at line 74 of file queue.c.

#define queueMUTEX_GIVE_BLOCK_TIME   ( ( portTickType ) 0 )

Definition at line 92 of file queue.c.

#define queueQUEUE_IS_MUTEX   NULL

Definition at line 86 of file queue.c.

#define queueSEMAPHORE_QUEUE_ITEM_LENGTH   ( 0 )

Definition at line 90 of file queue.c.

#define queueSEND_TO_BACK   ( 0 )

Definition at line 79 of file queue.c.

#define queueSEND_TO_FRONT   ( 1 )

Definition at line 80 of file queue.c.

#define queueUNLOCKED   ( ( signed portBASE_TYPE ) -1 )

Definition at line 73 of file queue.c.

#define uxQueueType   pcHead

Definition at line 84 of file queue.c.

#define uxRecursiveCallCount   pcReadFrom

Definition at line 85 of file queue.c.

Typedef Documentation

typedef struct QueueDefinition xQUEUE
typedef xQUEUE* xQueueHandle

Definition at line 124 of file queue.c.

Function Documentation

unsigned portBASE_TYPE uxQueueMessagesWaiting ( const xQueueHandle  pxQueue)

Definition at line 1022 of file queue.c.

unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR ( const xQueueHandle  pxQueue)

Definition at line 1034 of file queue.c.

void vQueueDelete ( xQueueHandle  xQueue)

Definition at line 1044 of file queue.c.

xQueueHandle xQueueCreate ( unsigned portBASE_TYPE  uxQueueLength,
unsigned portBASE_TYPE  uxItemSize 
)
xQueueHandle xQueueCreateMutex ( void  )

Definition at line 138 of file queue.c.

signed portBASE_TYPE xQueueGenericReceive ( xQueueHandle  pxQueue,
void *const  pvBuffer,
portTickType  xTicksToWait,
portBASE_TYPE  xJustPeeking 
)

Definition at line 824 of file queue.c.

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

Definition at line 455 of file queue.c.

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

Definition at line 771 of file queue.c.

signed portBASE_TYPE xQueueIsQueueEmptyFromISR ( const xQueueHandle  pxQueue)

Definition at line 1181 of file queue.c.

signed portBASE_TYPE xQueueIsQueueFullFromISR ( const xQueueHandle  pxQueue)

Definition at line 1203 of file queue.c.

signed portBASE_TYPE xQueueReceiveFromISR ( xQueueHandle  pxQueue,
void *const  pvBuffer,
signed portBASE_TYPE pxTaskWoken 
)

Definition at line 971 of file queue.c.