RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rkhtim.h File Reference

Platform - independent interface for supporting software timer services. More...

#include "rkhevt.h"

Go to the source code of this file.

Data Structures

struct  RKH_TINFO_T
 Defines the data structure into which the performance information for software timers is stored. More...
 
struct  RKH_TMR_T
 Defines the data structure used to maintain information that allows the timer-handling facility to update and expire software timers. More...
 

Macros

#define RKH_TMR_INIT(t_, e_, th_)   rkh_tmr_init_((t_), (e_), (th_))
 Initializes the previously allocated timer structure RKH_TMR_T. More...
 
#define RKH_TMR_ONESHOT(t, sma, itick)
 Start a timer as one-shot timer. More...
 
#define RKH_TMR_PERIODIC(t, sma, itick, per)
 Start a timer as periodic timer. More...
 

Typedefs

typedef void(* RKH_THK_T )(void *t)
 The prototype of callback function (hook) to call when the timer expires. More...
 
typedef rui8_t RKH_TNT_T
 This data type defines the dynamic range of the time delays measured in clock ticks (maximum number of ticks). More...
 

Functions

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.
 
void rkh_tmr_start (RKH_TMR_T *t, const struct RKH_SMA_T *sma, RKH_TNT_T itick)
 Start a timer. More...
 
void rkh_tmr_stop (RKH_TMR_T *t)
 Stops a running timer. More...
 
void rkh_tmr_get_info (RKH_TMR_T *t, RKH_TINFO_T *info)
 Retrieves performance information for a particular software timer. More...
 
void rkh_tmr_clear_info (RKH_TMR_T *t)
 Clear performance information for a particular software timer. More...
 

Detailed Description

Platform - independent interface for supporting software timer services.

Definition in file rkhtim.h.

Typedef Documentation

typedef void(* RKH_THK_T)(void *t)

The prototype of callback function (hook) to call when the timer expires.

Parameters
[in]tpointer to elapsed timer (RKH_TMR_T data structure).

Definition at line 200 of file rkhtim.h.

typedef rui8_t RKH_TNT_T

This data type defines the dynamic range of the time delays measured in clock ticks (maximum number of ticks).

The valid values [in bits] are 8, 16 or 32. Default is 8. This type is configurable via the preprocessor switch RKH_CFG_TMR_SIZEOF_NTIMER.

Definition at line 211 of file rkhtim.h.