33 lines
652 B
C++
33 lines
652 B
C++
/*
|
|
* StaticQueue.hpp
|
|
*
|
|
* Created on: 6 Sep 2023
|
|
* Author: malyarenko
|
|
*/
|
|
|
|
#ifndef PLATFORM_RTOS_QUEUESTATIC_HPP_
|
|
#define PLATFORM_RTOS_QUEUESTATIC_HPP_
|
|
|
|
#include <FreeRTOS.h>
|
|
#include <queue.h>
|
|
|
|
#include "Queue.hpp"
|
|
|
|
namespace platform {
|
|
namespace rtos {
|
|
|
|
template< UBaseType_t Length, UBaseType_t ItemSize >
|
|
struct QueueStatic : public Queue< Length, ItemSize > {
|
|
/** Буфер дескриптора */
|
|
StaticQueue_t desc;
|
|
/** Буфер очереди */
|
|
uint8_t storage[Length * ItemSize];
|
|
|
|
QueueStatic() { };
|
|
};
|
|
|
|
} /* namespace rtos */
|
|
} /* namespace platform */
|
|
|
|
#endif /* PLATFORM_RTOS_QUEUESTATIC_HPP_ */
|