36 lines
700 B
C++
36 lines
700 B
C++
/*
|
|
* Queue.hpp
|
|
*
|
|
* Created on: 6 Sep 2023
|
|
* Author: malyarenko
|
|
*/
|
|
|
|
#ifndef PLATFORM_RTOS_QUEUE_HPP_
|
|
#define PLATFORM_RTOS_QUEUE_HPP_
|
|
|
|
#include <FreeRTOS.h>
|
|
#include <queue.h>
|
|
|
|
namespace platform {
|
|
namespace rtos {
|
|
|
|
template< UBaseType_t Length, UBaseType_t ItemSize >
|
|
struct Queue {
|
|
/** Количество элементов */
|
|
const UBaseType_t length;
|
|
/** Размер элемента */
|
|
const UBaseType_t item_size;
|
|
/** Дескриптор */
|
|
QueueHandle_t handle;
|
|
|
|
Queue()
|
|
: length(Length),
|
|
item_size(ItemSize),
|
|
handle(NULL) { };
|
|
};
|
|
|
|
} /* namespace rtos */
|
|
} /* namespace platform */
|
|
|
|
#endif /* PLATFORM_RTOS_QUEUE_HPP_ */
|