From 82f64aca610d4c6683e8753fd54bceccd6c05ff4 Mon Sep 17 00:00:00 2001 From: dario Date: Tue, 19 Nov 2024 20:32:47 +0100 Subject: [PATCH] Added peek() method to Event interface --- include/sta/event.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/sta/event.hpp b/include/sta/event.hpp index 56b05a9..eaa4d47 100644 --- a/include/sta/event.hpp +++ b/include/sta/event.hpp @@ -35,12 +35,19 @@ namespace sta */ virtual uint32_t get() = 0; /** - * @brief Wait until event flag is set. Timeout default to forever. + * @brief Wait until event flags are set and clears them afterwards. Timeout default to forever. * - * @param flags flag nr. to wait for. + * @param flags flags to wait for. * @param timeout timeout in ms., default to forever. */ virtual uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) = 0; + /** + * @brief Wait until event flags are set without clearing them afterwards. Timeout default to forever. + * + * @param flags flags to wait for. + * @param timeout timeout in ms., default to forever. + */ + virtual uint32_t peek(uint32_t flags, uint32_t timeout = osWaitForever) = 0; }; } // namespace sta