#pragma once #include #include /** * 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 * QueueHandle_t; struct QueueHandle_t { std::mutex mutex; std::vector queue; QueueHandle_t() {} QueueHandle_t(const QueueHandle_t &o) { queue=o.queue; } QueueHandle_t &operator=(const QueueHandle_t &o) { queue=o.queue; return *this; } }; //using QueueHandle_t = std::vector; QueueHandle_t xQueueCreate(const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize); BaseType_t xQueueSend(QueueHandle_t &xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait); BaseType_t xQueueSendFromISR(QueueHandle_t &xQueue, const void * const pvItemToQueue, BaseType_t *xHigherPriorityTaskWoken); BaseType_t xQueueReceive(QueueHandle_t &xQueue, void * const pvBuffer, TickType_t xTicksToWait );