RKH
RKH_TMR_T Struct Reference

Defines the data structure used to maintain information that allows the timer-handling facility to update and expire software timers. More...

#include <rkhtmr.h>

Data Fields

RKH_EVT_Tevt
  More...
 
RKH_TMR_Ttnext
  More...
 
const struct RKH_SMA_Tsma
 State machine application (a.k.a Active Object) that receives the timer event.
 
RKH_TNT_T ntick
 Tick down-counter.
 
RKH_TNT_T period
 Number of ticks for all timer expirations after the first (expiration period). A zero for this parameter makes the timer a one-shot timer, otherwise, for periodic timers, any value in range.
 
rui8_t used
  More...
 
RKH_THK_T timhk
  More...
 
RKH_TINFO_T info
  More...
 

Detailed Description

Defines the data structure used to maintain information that allows the timer-handling facility to update and expire software timers.

RKH software timers enables to execute application C functions and/or send an event to application state machine (SMA) at specific intervals of time. It can also set an application timer to expire only once. This type of timer is called a one-shot timer, while repeating interval timers are called periodic timers. Each application timer is a public resource. Time intervals are measured by periodic timer interrupts. Each timer interrupt is called a timer-tick. The actual time between timer-ticks is specified by the application. On the other hand, application timers execute in the order in which they become active.

Note
RKH prohibits an application from explicitly modifying the RKH_TMR_T structure. The RKH's timer structures can be located anywhere in memory, but it is most common to make it a global structure by defining it outside the scope of any function. An RKH timer is created when an application timer is declared with the RKH_TMR_T data type. The following listing declares "my_timer" timer:
RKH_TMR_T my_timer;
Defines the data structure used to maintain information that allows the timer-handling facility to up...
Definition: rkhtmr.h:315

Definition at line 314 of file rkhtmr.h.

Field Documentation

◆ evt

RKH_EVT_T* evt

Points to timer event.

Definition at line 319 of file rkhtmr.h.

◆ tnext

RKH_TMR_T* tnext

Points to next timer structure in the doubly linked list.

Definition at line 324 of file rkhtmr.h.

◆ used

rui8_t used

A non-zero value indicates that the timer is linked.

Definition at line 350 of file rkhtmr.h.

◆ timhk

RKH_THK_T timhk

Hook function to call when the timer expires. This member is optional, thus it could be declared as NULL or eliminated in compile-time with RKH_CFG_TMR_HOOK_EN.

Definition at line 358 of file rkhtmr.h.

◆ info

Performance information. This member is optional, thus it could be eliminated in compile-time with RKH_CFG_TMR_GET_INFO_EN.

Definition at line 366 of file rkhtmr.h.


The documentation for this struct was generated from the following file: