50 #ifndef __RKHFWK_HOOK_H__
51 #define __RKHFWK_HOOK_H__
63 #if (RKH_CFG_HOOK_DISPATCH_EN == RKH_ENABLED)
64 #define RKH_HOOK_DISPATCH(sma, e) \
65 rkh_hook_dispatch((sma), (RKH_EVT_T *)(e))
67 #define RKH_HOOK_DISPATCH(sma, e) (void)0
70 #if (RKH_CFG_HOOK_TIMEOUT_EN == RKH_ENABLED)
71 #define RKH_HOOK_TIMEOUT(t) rkh_hook_timeout((t))
73 #define RKH_HOOK_TIMEOUT(t) (void)0
76 #if (RKH_CFG_HOOK_SIGNAL_EN == RKH_ENABLED)
77 #define RKH_HOOK_SIGNAL(e) rkh_hook_signal((RKH_EVT_T *)(e))
79 #define RKH_HOOK_SIGNAL(e) (void)0
82 #if (RKH_CFG_HOOK_START_EN == RKH_ENABLED)
83 #define RKH_HOOK_START() rkh_hook_start()
85 #define RKH_HOOK_START() (void)0
88 #if (RKH_CFG_HOOK_EXIT_EN == RKH_ENABLED)
89 #define RKH_HOOK_EXIT() rkh_hook_exit()
91 #define RKH_HOOK_EXIT() (void)0
94 #if (RKH_CFG_HOOK_TIMETICK_EN == RKH_ENABLED)
95 #define RKH_HOOK_TIMETICK() rkh_hook_timetick()
97 #define RKH_HOOK_TIMETICK() (void)0
100 #if (RKH_CFG_HOOK_PUT_TRCEVT_EN == RKH_ENABLED)
101 #define RKH_HOOK_PUT_TRCEVT() rkh_hook_putTrcEvt()
103 #define RKH_HOOK_PUT_TRCEVT() (void)0
void rkh_hook_timeout(const void *t)
If a timer expires the rkh_hook_timeout() function is called just before the assigned event is direct...
Describes the SMA (active object in UML).
void rkh_hook_signal(RKH_EVT_T *e)
When the producer of an event directly posts the event to the event queue of the consumer SMA the rkh...
Represents events without parameters.
void rkh_hook_start(void)
This hook function is called just before the RKH takes over control of the application.
void rkh_hook_putTrcEvt(void)
This function is called from rkh_trc_end() function, at the end of that, to allow to the application ...
void rkh_hook_timetick(void)
This function is called by rkh_tmr_tick(), which is assumed to be called from an ISR. rkh_hook_timetick() is called at the very beginning of rkh_tmr_tick(), to give priority to user or port-specific code when the tick interrupt occurs.
void rkh_hook_idle(void)
An idle hook function will only get executed (with interrupts LOCKED) when there are no SMAs of highe...
void rkh_hook_exit(void)
This hook function is called just before the RKH returns to the underlying OS/RTOS. Usually, the rkh_hook_exit() is useful when executing clean-up code upon SMA terminate or framework exit.
void rkh_hook_dispatch(RKH_SMA_T *me, RKH_EVT_T *e)
When dispatching an event to a SMA the dispatch hook function will be executed.
Specifies the interface of the acive object (SMA state machine applications) manager.
Defines the data types that uses RKH.