diff --git a/include/sta/rtos/event.hpp b/include/sta/rtos/event.hpp index b058e0c..b1288a1 100644 --- a/include/sta/rtos/event.hpp +++ b/include/sta/rtos/event.hpp @@ -48,9 +48,10 @@ namespace sta */ uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) override; + uint32_t waitAll(uint32_t flags, uint32_t timeout = osWaitForever) override; private: osEventFlagsId_t event_id; /**< CMSIS RTOS2 Event Flag */ }; } // namespace sta -#endif // STA_RTOS_EVENT_HPP \ No newline at end of file +#endif // STA_RTOS_EVENT_HPP diff --git a/src/event.cpp b/src/event.cpp index c6795cd..bcaff5f 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -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 \ No newline at end of file + uint32_t RtosEvent::waitAll(uint32_t flags, uint32_t timeout /* = osWaitForever */) + { + return osEventFlagsWait(event_id, flags, osFlagsWaitAll, timeout); + } + +} // namespace sta