mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-06 01:37:33 +00:00
Moved system events to TACOS and re-introduced onManagerInit() and onStatemachineInit() for backwards compatibility
This commit is contained in:
@@ -303,7 +303,7 @@ namespace sta
|
||||
* @ingroup tacos_statemachine
|
||||
*/
|
||||
STA_WEAK
|
||||
void onStateTransition(uint16_t from, uint16_t to, uint32_t lockout){}
|
||||
void onStateTransition(uint16_t from, uint16_t to, uint32_t lockout) {}
|
||||
} // namespace tacos
|
||||
} // namespace sta
|
||||
|
||||
|
82
include/sta/tacos/system/events.hpp
Normal file
82
include/sta/tacos/system/events.hpp
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Implementation of system events.
|
||||
*/
|
||||
#ifndef STA_TACOS_SYSTEM_EVENTS_HPP
|
||||
#define STA_TACOS_SYSTEM_EVENTS_HPP
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup STA_RTOS_SysEvent System Events
|
||||
* @ingroup STA_RTOS_API
|
||||
* @brief System events.
|
||||
*
|
||||
* Check @ref STA_RTOS_BuildConfig for configuration options.
|
||||
*/
|
||||
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
// System event flags
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Startup system event flag.
|
||||
*
|
||||
* @ingroup STA_RTOS_SysEvent
|
||||
*/
|
||||
#define STA_TACOS_SYSTEM_EVENTS_STARTUP 0x100000U
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
namespace tacos
|
||||
{
|
||||
/**
|
||||
* @brief Initialize system events.
|
||||
*/
|
||||
void initSystemEvents();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Signal system events.
|
||||
*
|
||||
* @param flags System event flags
|
||||
*
|
||||
* @ingroup STA_RTOS_SysEvent
|
||||
*/
|
||||
void signalSystemEvents(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 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();
|
||||
} // namespace tacos
|
||||
} // namespace sta
|
||||
|
||||
|
||||
#endif // STA_RTOS_SYSTEM_EVENTS_HPP
|
Reference in New Issue
Block a user