mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-06-10 01:55:59 +00:00
Fixed Queue<T> Sizes
This commit is contained in:
parent
d4aa3c4081
commit
d7422260a6
@ -24,19 +24,19 @@ namespace sta
|
||||
|
||||
template <typename T>
|
||||
RtosQueue<T>::RtosQueue(uint32_t length)
|
||||
: handle_{osMessageQueueNew(length, sizeof(Message), NULL)}
|
||||
: handle_{osMessageQueueNew(length, sizeof(T), NULL)}
|
||||
{
|
||||
STA_ASSERT(handle_ != NULL);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool RtosQueue<T>::put(const Message & msg, uint32_t timeout /* = osWaitForever */)
|
||||
bool RtosQueue<T>::put(const T & msg, uint32_t timeout /* = osWaitForever */)
|
||||
{
|
||||
return (osOK == osMessageQueuePut(handle_, &msg, 0, timeout));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool RtosQueue<T>::get(Message * outMsg, uint32_t timeout /* = osWaitForever */)
|
||||
bool RtosQueue<T>::get(T * outMsg, uint32_t timeout /* = osWaitForever */)
|
||||
{
|
||||
uint8_t prio;
|
||||
return (osOK == osMessageQueueGet(handle_, outMsg, &prio, timeout));
|
||||
|
Loading…
x
Reference in New Issue
Block a user