111 #if RKH_CFG_TMR_HOOK_EN == RKH_ENABLED
112 #define RKH_TMR_INIT(t_, e_, th_) \
113 rkh_tmr_init_((t_), (e_), (th_))
115 #define RKH_TMR_INIT(t_, e_, th_) \
116 rkh_tmr_init_((t_), (e_))
149 #define RKH_TMR_ONESHOT(t, sma, itick) \
151 rkh_tmr_start(t, sma, itick)
188 #define RKH_TMR_PERIODIC(t, sma, itick, per) \
189 (t)->period = (per); \
190 rkh_tmr_start((t), (sma), (itick))
210 #if RKH_CFG_TMR_SIZEOF_NTIMER == 8
212 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 16
214 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 32
312 #if RKH_CFG_TMR_HOOK_EN == RKH_ENABLED
320 #if RKH_CFG_TMR_GET_INFO_EN == RKH_ENABLED
327 #if RKH_CFG_TMR_HOOK_EN == RKH_ENABLED
void rkh_tmr_start(RKH_TMR_T *t, const struct RKH_SMA_T *sma, RKH_TNT_T itick)
Start a timer.
void(* RKH_THK_T)(void *t)
The prototype of callback function (hook) to call when the timer expires.
void rkh_tmr_clear_info(RKH_TMR_T *t)
Clear performance information for a particular software timer.
Describes the SMA (active object in UML).
void rkh_tmr_init_(RKH_TMR_T *t, const RKH_EVT_T *e, RKH_THK_T thk)
Initializes the previously allocated timer structure RKH_TMR_T.
Represents events without parameters.
Event data type and other related macros.This header file must be included in all modules(*...
Defines the data structure into which the performance information for software timers is stored...
Defines the data structure used to maintain information that allows the timer-handling facility to up...
void rkh_tmr_get_info(RKH_TMR_T *t, RKH_TINFO_T *info)
Retrieves performance information for a particular software timer.
RKH_TNT_T ntick
Tick down-counter.
void rkh_tmr_stop(RKH_TMR_T *t)
Stops a running timer.
RKH_TNT_T period
Number of ticks for all timer expirations after the first (expiration period). A zero for this parame...
rui8_t RKH_TNT_T
This data type defines the dynamic range of the time delays measured in clock ticks (maximum number o...
const struct RKH_SMA_T * sma
State machine application (a.k.a Active Object) that receives the timer event.