Removed system events and startup, added peek method to RtosEvent class

This commit is contained in:
dario
2024-11-19 20:29:22 +01:00
parent 6bffcd9444
commit 3bf870bb24
6 changed files with 17 additions and 191 deletions

View File

@@ -40,7 +40,7 @@ namespace sta
uint32_t get() override;
/**
* @brief Wait for any of the given flags to be set.
* @brief Wait for any of the given flags to be set. Clears the flags afterwards
*
* @param flags Flags to wait for.
* @param timeout Timeout in milliseconds.
@@ -48,9 +48,17 @@ namespace sta
*/
uint32_t wait(uint32_t flags, uint32_t timeout = osWaitForever) override;
/**
* @brief Wait for any of the given flags to be set without clearing the flags afterwards.
*
* @param flags Flags to wait for.
* @param timeout Timeout in milliseconds.
* @return Event flags before clearing or error code if highest bit set.
*/
uint32_t peek(uint32_t flags, uint32_t timeout = osWaitForever) override;
private:
osEventFlagsId_t event_id; /**< CMSIS RTOS2 Event Flag */
};
} // namespace sta
#endif // STA_RTOS_EVENT_HPP
#endif // STA_RTOS_EVENT_HPP