Added timeout to event wait

This commit is contained in:
dario
2024-06-19 15:06:10 +02:00
parent ff1cbf8473
commit 736b90c602
2 changed files with 9 additions and 3 deletions

View File

@@ -22,8 +22,13 @@ namespace sta {
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);
}
} // namespace sta
uint32_t RtosEvent::waitAll(uint32_t flags, uint32_t timeout /* = osWaitForever */)
{
return osEventFlagsWait(event_id, flags, osFlagsWaitAll, timeout);
}
} // namespace sta