mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-06-12 02:36:00 +00:00
Added timeout to event wait
This commit is contained in:
parent
ff1cbf8473
commit
736b90c602
@ -48,9 +48,10 @@ namespace sta
|
|||||||
*/
|
*/
|
||||||
uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) override;
|
uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) override;
|
||||||
|
|
||||||
|
uint32_t waitAll(uint32_t flags, uint32_t timeout = osWaitForever) override;
|
||||||
private:
|
private:
|
||||||
osEventFlagsId_t event_id; /**< CMSIS RTOS2 Event Flag */
|
osEventFlagsId_t event_id; /**< CMSIS RTOS2 Event Flag */
|
||||||
};
|
};
|
||||||
} // namespace sta
|
} // namespace sta
|
||||||
|
|
||||||
#endif // STA_RTOS_EVENT_HPP
|
#endif // STA_RTOS_EVENT_HPP
|
||||||
|
@ -22,8 +22,13 @@ namespace sta {
|
|||||||
return osEventFlagsGet(event_id);
|
return osEventFlagsGet(event_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t RtosEvent::wait(uint32_t flags, uint32_t timeout) {
|
uint32_t RtosEvent::wait(uint32_t flags, uint32_t timeout /* = osWaitForever */) {
|
||||||
return osEventFlagsWait(event_id, flags, osFlagsWaitAny, timeout);
|
return osEventFlagsWait(event_id, flags, osFlagsWaitAny, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace sta
|
uint32_t RtosEvent::waitAll(uint32_t flags, uint32_t timeout /* = osWaitForever */)
|
||||||
|
{
|
||||||
|
return osEventFlagsWait(event_id, flags, osFlagsWaitAll, timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace sta
|
||||||
|
Loading…
x
Reference in New Issue
Block a user