#include <stdlib.h>
#include <string.h>
#include "include/FreeRTOS.h"
#include "include/task.h"
#include "include/queue.h"
Data Structures | |
struct | QueueDefinition |
Macros | |
#define | MPU_WRAPPERS_INCLUDED_FROM_API_FILE |
#define | prvLockQueue(pxQueue) |
#define | pxMutexHolder pcTail |
#define | queueDONT_BLOCK ( ( portTickType ) 0U ) |
#define | queueERRONEOUS_UNBLOCK ( -1 ) |
#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 |
#define | uxRecursiveCallCount pcReadFrom |
Typedefs | |
typedef struct QueueDefinition | xQUEUE |
Functions | |
static void | prvCopyDataFromQueue (xQUEUE *const pxQueue, const void *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, 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 | xQueueReceiveFromISR (xQueueHandle xQueue, 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 queueDONT_BLOCK ( ( portTickType ) 0U ) |
#define queueERRONEOUS_UNBLOCK ( -1 ) |
#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 |
#define uxRecursiveCallCount pcReadFrom |
typedef struct QueueDefinition xQUEUE |
|
static |
References QueueDefinition::pcHead, QueueDefinition::pcReadFrom, QueueDefinition::pcTail, queueQUEUE_IS_MUTEX, and QueueDefinition::uxItemSize.
Referenced by xQueueGenericReceive(), and xQueueReceiveFromISR().
|
static |
References NULL, QueueDefinition::pcHead, QueueDefinition::pcReadFrom, QueueDefinition::pcTail, QueueDefinition::pcWriteTo, queueQUEUE_IS_MUTEX, queueSEND_TO_BACK, 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 | ) |
References configASSERT, taskENTER_CRITICAL, and taskEXIT_CRITICAL.
unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR | ( | const xQueueHandle | xQueue | ) |
References configASSERT.
void vQueueDelete | ( | xQueueHandle | xQueue | ) |
References configASSERT, QueueDefinition::pcHead, traceQUEUE_DELETE, and vPortFree().
xQueueHandle xQueueGenericCreate | ( | unsigned portBASE_TYPE | uxQueueLength, |
unsigned portBASE_TYPE | uxItemSize, | ||
unsigned char | ucQueueType | ||
) |
signed portBASE_TYPE xQueueGenericReceive | ( | xQueueHandle | xQueue, |
void *const | pvBuffer, | ||
portTickType | xTicksToWait, | ||
portBASE_TYPE | xJustPeeking | ||
) |
portBASE_TYPE xQueueGenericReset | ( | xQueueHandle | xQueue, |
portBASE_TYPE | xNewQueue | ||
) |
References configASSERT, listLIST_IS_EMPTY, QueueDefinition::pcHead, QueueDefinition::pcReadFrom, QueueDefinition::pcTail, QueueDefinition::pcWriteTo, pdFALSE, pdPASS, pdTRUE, portYIELD_WITHIN_API, queueUNLOCKED, taskENTER_CRITICAL, taskEXIT_CRITICAL, QueueDefinition::uxItemSize, QueueDefinition::uxLength, QueueDefinition::uxMessagesWaiting, vListInitialise(), QueueDefinition::xRxLock, xTaskRemoveFromEventList(), QueueDefinition::xTasksWaitingToReceive, QueueDefinition::xTasksWaitingToSend, and QueueDefinition::xTxLock.
signed portBASE_TYPE xQueueGenericSend | ( | xQueueHandle | xQueue, |
const void *const | pvItemToQueue, | ||
portTickType | xTicksToWait, | ||
portBASE_TYPE | xCopyPosition | ||
) |
References configASSERT, errQUEUE_FULL, listLIST_IS_EMPTY, NULL, pdFALSE, pdPASS, pdTRUE, portTickType, portYIELD_WITHIN_API, prvCopyDataToQueue(), prvIsQueueFull(), prvLockQueue, prvUnlockQueue(), taskENTER_CRITICAL, taskEXIT_CRITICAL, traceBLOCKING_ON_QUEUE_SEND, traceQUEUE_SEND, traceQUEUE_SEND_FAILED, QueueDefinition::uxItemSize, QueueDefinition::uxLength, QueueDefinition::uxMessagesWaiting, vTaskPlaceOnEventList(), vTaskSetTimeOutState(), vTaskSuspendAll(), xTaskCheckForTimeOut(), xTaskRemoveFromEventList(), xTaskResumeAll(), QueueDefinition::xTasksWaitingToReceive, and QueueDefinition::xTasksWaitingToSend.
signed portBASE_TYPE xQueueGenericSendFromISR | ( | xQueueHandle | xQueue, |
const void *const | pvItemToQueue, | ||
signed portBASE_TYPE * | pxHigherPriorityTaskWoken, | ||
portBASE_TYPE | xCopyPosition | ||
) |
References configASSERT, errQUEUE_FULL, listLIST_IS_EMPTY, NULL, pdFALSE, pdPASS, pdTRUE, portCLEAR_INTERRUPT_MASK_FROM_ISR, portSET_INTERRUPT_MASK_FROM_ISR, prvCopyDataToQueue(), queueUNLOCKED, traceQUEUE_SEND_FROM_ISR, traceQUEUE_SEND_FROM_ISR_FAILED, QueueDefinition::uxItemSize, QueueDefinition::uxLength, QueueDefinition::uxMessagesWaiting, xTaskRemoveFromEventList(), QueueDefinition::xTasksWaitingToReceive, and QueueDefinition::xTxLock.
signed portBASE_TYPE xQueueIsQueueEmptyFromISR | ( | const xQueueHandle | xQueue | ) |
References configASSERT, pdFALSE, and pdTRUE.
signed portBASE_TYPE xQueueIsQueueFullFromISR | ( | const xQueueHandle | xQueue | ) |
References configASSERT, pdFALSE, and pdTRUE.
signed portBASE_TYPE xQueueReceiveFromISR | ( | xQueueHandle | xQueue, |
void *const | pvBuffer, | ||
signed portBASE_TYPE * | pxHigherPriorityTaskWoken | ||
) |