#include <stdlib.h>
#include <string.h>
#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
Data Structures | |
struct | QueueDefinition |
Macros | |
#define | MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define | prvLockQueue(pxQueue) |
#define | pxMutexHolder pcTail |
#define | queueLOCKED_UNMODIFIED ( ( signed portBASE_TYPE ) 0 ) |
#define | queueMUTEX_GIVE_BLOCK_TIME ( ( portTickType ) 0U ) |
#define | queueQUEUE_IS_MUTEX NULL |
#define | queueSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned portBASE_TYPE ) 0 ) |
#define | queueUNLOCKED ( ( signed portBASE_TYPE ) -1 ) |
#define | uxQueueType pcHead |
Typedefs | |
typedef struct QueueDefinition | xQUEUE |
Functions | |
static void | prvCopyDataFromQueue (xQUEUE *const pxQueue, const void *const pvBuffer) PRIVILEGED_FUNCTION |
static void | prvCopyDataToQueue (xQUEUE *pxQueue, const void *pvItemToQueue, portBASE_TYPE xPosition) PRIVILEGED_FUNCTION |
static signed portBASE_TYPE | prvIsQueueEmpty (const xQUEUE *pxQueue) PRIVILEGED_FUNCTION |
static signed portBASE_TYPE | prvIsQueueFull (const xQUEUE *pxQueue) PRIVILEGED_FUNCTION |
static void | prvUnlockQueue (xQUEUE *pxQueue) PRIVILEGED_FUNCTION |
unsigned portBASE_TYPE | uxQueueMessagesWaiting (const xQueueHandle xQueue) |
unsigned portBASE_TYPE | uxQueueMessagesWaitingFromISR (const xQueueHandle xQueue) |
void | vQueueDelete (xQueueHandle xQueue) |
xQueueHandle | xQueueGenericCreate (unsigned portBASE_TYPE uxQueueLength, unsigned portBASE_TYPE uxItemSize, unsigned char ucQueueType) |
signed portBASE_TYPE | xQueueGenericReceive (xQueueHandle xQueue, const void *const pvBuffer, portTickType xTicksToWait, portBASE_TYPE xJustPeeking) |
portBASE_TYPE | xQueueGenericReset (xQueueHandle xQueue, portBASE_TYPE xNewQueue) |
signed portBASE_TYPE | xQueueGenericSend (xQueueHandle xQueue, const void *const pvItemToQueue, portTickType xTicksToWait, portBASE_TYPE xCopyPosition) |
signed portBASE_TYPE | xQueueGenericSendFromISR (xQueueHandle xQueue, const void *const pvItemToQueue, signed portBASE_TYPE *pxHigherPriorityTaskWoken, portBASE_TYPE xCopyPosition) |
signed portBASE_TYPE | xQueueIsQueueEmptyFromISR (const xQueueHandle xQueue) |
signed portBASE_TYPE | xQueueIsQueueFullFromISR (const xQueueHandle xQueue) |
signed portBASE_TYPE | xQueuePeekFromISR (xQueueHandle xQueue, const void *const pvBuffer) |
signed portBASE_TYPE | xQueueReceiveFromISR (xQueueHandle xQueue, const void *const pvBuffer, signed portBASE_TYPE *pxHigherPriorityTaskWoken) |
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define prvLockQueue | ( | pxQueue | ) |
Referenced by xQueueGenericReceive(), and xQueueGenericSend().
#define pxMutexHolder pcTail |
#define queueLOCKED_UNMODIFIED ( ( signed portBASE_TYPE ) 0 ) |
Referenced by prvUnlockQueue().
#define queueMUTEX_GIVE_BLOCK_TIME ( ( portTickType ) 0U ) |
#define queueQUEUE_IS_MUTEX NULL |
Referenced by prvCopyDataFromQueue(), prvCopyDataToQueue(), and xQueueGenericReceive().
#define queueSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned portBASE_TYPE ) 0 ) |
#define queueUNLOCKED ( ( signed portBASE_TYPE ) -1 ) |
Referenced by prvUnlockQueue(), xQueueGenericReset(), xQueueGenericSendFromISR(), and xQueueReceiveFromISR().
#define uxQueueType pcHead |
typedef struct QueueDefinition xQUEUE |
|
static |
References QueueDefinition::pcHead, QueueDefinition::pcReadFrom, QueueDefinition::pcTail, queueQUEUE_IS_MUTEX, QueueDefinition::u, and QueueDefinition::uxItemSize.
Referenced by xQueueGenericReceive(), xQueuePeekFromISR(), and xQueueReceiveFromISR().
|
static |
References NULL, QueueDefinition::pcHead, QueueDefinition::pcReadFrom, QueueDefinition::pcTail, QueueDefinition::pcWriteTo, queueOVERWRITE, queueQUEUE_IS_MUTEX, queueSEND_TO_BACK, QueueDefinition::u, QueueDefinition::uxItemSize, QueueDefinition::uxMessagesWaiting, and vTaskPriorityDisinherit().
Referenced by xQueueGenericSend(), and xQueueGenericSendFromISR().
|
static |
References pdFALSE, pdTRUE, taskENTER_CRITICAL, taskEXIT_CRITICAL, and QueueDefinition::uxMessagesWaiting.
Referenced by xQueueGenericReceive().
|
static |
References pdFALSE, pdTRUE, taskENTER_CRITICAL, taskEXIT_CRITICAL, QueueDefinition::uxLength, and QueueDefinition::uxMessagesWaiting.
Referenced by xQueueGenericSend().
|
static |
References listLIST_IS_EMPTY, NULL, pdFALSE, pdTRUE, queueLOCKED_UNMODIFIED, queueSEND_TO_BACK, queueUNLOCKED, taskENTER_CRITICAL, taskEXIT_CRITICAL, vTaskMissedYield(), QueueDefinition::xRxLock, xTaskRemoveFromEventList(), QueueDefinition::xTasksWaitingToReceive, QueueDefinition::xTasksWaitingToSend, and QueueDefinition::xTxLock.
Referenced by xQueueGenericReceive(), and xQueueGenericSend().
unsigned portBASE_TYPE uxQueueMessagesWaiting | ( | const xQueueHandle | xQueue | ) |
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR | ( | const xQueueHandle | xQueue | ) |
void vQueueDelete | ( | xQueueHandle | xQueue | ) |
xQueueHandle xQueueGenericCreate | ( | unsigned portBASE_TYPE | uxQueueLength, |
unsigned portBASE_TYPE | uxItemSize, | ||
unsigned char | ucQueueType | ||
) |
signed portBASE_TYPE xQueueGenericReceive | ( | xQueueHandle | xQueue, |
const void *const | pvBuffer, | ||
portTickType | xTicksToWait, | ||
portBASE_TYPE | xJustPeeking | ||
) |
References configASSERT, errQUEUE_EMPTY, listLIST_IS_EMPTY, NULL, QueueDefinition::pcReadFrom, pdFALSE, pdPASS, pdTRUE, portTickType, portYIELD_WITHIN_API, prvCopyDataFromQueue(), prvIsQueueEmpty(), prvLockQueue, prvUnlockQueue(), queueQUEUE_IS_MUTEX, taskENTER_CRITICAL, taskEXIT_CRITICAL, traceBLOCKING_ON_QUEUE_RECEIVE, traceQUEUE_PEEK, traceQUEUE_RECEIVE, traceQUEUE_RECEIVE_FAILED, QueueDefinition::u, QueueDefinition::uxItemSize, QueueDefinition::uxMessagesWaiting, vTaskPlaceOnEventList(), vTaskPriorityInherit(), vTaskSetTimeOutState(), vTaskSuspendAll(), xTaskCheckForTimeOut(), xTaskGetCurrentTaskHandle(), xTaskRemoveFromEventList(), xTaskResumeAll(), QueueDefinition::xTasksWaitingToReceive, and QueueDefinition::xTasksWaitingToSend.
portBASE_TYPE xQueueGenericReset | ( | xQueueHandle | xQueue, |
portBASE_TYPE | xNewQueue | ||
) |
Referenced by prvInitialiseNewQueue(), and xQueueGenericCreate().
signed portBASE_TYPE xQueueGenericSend | ( | xQueueHandle | xQueue, |
const void *const | pvItemToQueue, | ||
portTickType | xTicksToWait, | ||
portBASE_TYPE | xCopyPosition | ||
) |
signed portBASE_TYPE xQueueGenericSendFromISR | ( | xQueueHandle | xQueue, |
const void *const | pvItemToQueue, | ||
signed portBASE_TYPE * | pxHigherPriorityTaskWoken, | ||
portBASE_TYPE | xCopyPosition | ||
) |
signed portBASE_TYPE xQueueIsQueueEmptyFromISR | ( | const xQueueHandle | xQueue | ) |
signed portBASE_TYPE xQueueIsQueueFullFromISR | ( | const xQueueHandle | xQueue | ) |
signed portBASE_TYPE xQueuePeekFromISR | ( | xQueueHandle | xQueue, |
const void *const | pvBuffer | ||
) |
References configASSERT, NULL, QueueDefinition::pcReadFrom, pdFAIL, pdPASS, portASSERT_IF_INTERRUPT_PRIORITY_INVALID, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvCopyDataFromQueue(), traceQUEUE_PEEK_FROM_ISR, traceQUEUE_PEEK_FROM_ISR_FAILED, QueueDefinition::u, QueueDefinition::uxItemSize, and QueueDefinition::uxMessagesWaiting.
signed portBASE_TYPE xQueueReceiveFromISR | ( | xQueueHandle | xQueue, |
const void *const | pvBuffer, | ||
signed portBASE_TYPE * | pxHigherPriorityTaskWoken | ||
) |
References configASSERT, listLIST_IS_EMPTY, NULL, pdFAIL, pdFALSE, pdPASS, pdTRUE, portASSERT_IF_INTERRUPT_PRIORITY_INVALID, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvCopyDataFromQueue(), queueUNLOCKED, traceQUEUE_RECEIVE_FROM_ISR, traceQUEUE_RECEIVE_FROM_ISR_FAILED, QueueDefinition::uxItemSize, QueueDefinition::uxMessagesWaiting, QueueDefinition::xRxLock, xTaskRemoveFromEventList(), and QueueDefinition::xTasksWaitingToSend.