Prototype for tick events

This commit is contained in:
dario
2025-02-16 00:02:20 +01:00
parent aa21c44270
commit 1479e75365
2 changed files with 138 additions and 60 deletions

View File

@@ -33,48 +33,64 @@ namespace sta
{
namespace tacos
{
/**
* @brief Initialize system events.
*/
void initSystemEvents();
namespace events
{
enum class Types : uint32_t
{
STARTUP = 0x01,
TICK_100Hz = 0x02,
TOCK_100Hz = 0x03,
TICK_50Hz = 0x04,
TOCK_50Hz = 0x05,
TICK_20Hz = 0x06,
TOCK_20Hz = 0x07,
TICK_10Hz = 0x08,
TOCK_10Hz = 0x09,
TICK_1Hz = 0x0A,
TOCK_1Hz = 0x0B
};
/**
* @brief Initialize system events.
*/
void init();
/**
* @brief Signal system events.
*
* @param flags System event flags
*
* @ingroup STA_RTOS_SysEvent
*/
void signalSystemEvents(uint32_t flags);
/**
* @brief Signal system events.
*
* @param flags System event flags
*
* @ingroup STA_RTOS_SysEvent
*/
void signal(uint32_t flags);
/**
* @brief Wait for system events.
*
* @param flags System event flags
* @param options osFlagsWaitAll or osFlagsWaitAny (osFlagsNoClear always set)
* @param timeout Wait timeout (0 = instant, osWaitForever = infinite)
*
* @ingroup STA_RTOS_SysEvent
*/
void waitForSystemEvents(uint32_t flags, uint32_t options, uint32_t timeout);
/**
* @brief Wait for system events.
*
* @param flags System event flags
* @param options osFlagsWaitAll or osFlagsWaitAny (osFlagsNoClear always set)
* @param timeout Wait timeout (0 = instant, osWaitForever = infinite)
*
* @ingroup STA_RTOS_SysEvent
*/
void wait(uint32_t flags, uint32_t options, uint32_t timeout);
/**
* @brief Signal startup system event.
*
* @ingroup STA_RTOS_SysEvent
*/
void signalStartup();
/**
* @brief Signal startup system event.
*
* @ingroup STA_RTOS_SysEvent
*/
void signalStartupEvent();
/**
* @brief Wait for startup system event.
*
* Blocking while waiting
*
* @ingroup STA_RTOS_SysEvent
*/
void waitForStartupEvent();
/**
* @brief Wait for startup system event.
*
* Blocking while waiting
*
* @ingroup STA_RTOS_SysEvent
*/
void waitForStartup();
} // namespace events
} // namespace tacos
} // namespace sta