ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

Public Member Functions | Data Fields

chibios_rt::Timer Class Reference

Timer class. More...

#include <ch.hpp>

Public Member Functions

void Set (systime_t time, vtfunc_t vtfunc, void *par)
 Starts the timer.
void Reset ()
 Resets the timer.
bool IsArmed (void)
 Returns the timer status.

Data Fields

struct::VirtualTimer timer
 Embedded VirtualTimer structure.

Detailed Description

Timer class.

Definition at line 81 of file ch.hpp.


Member Function Documentation

void chibios_rt::Timer::Set ( systime_t  time,
vtfunc_t  vtfunc,
void *  par 
)

Starts the timer.

Parameters:
time the time in system ticks
vtfunc the timer callback function
par the parameter for the callback function
Note:
It must be called with the interrupts disabled.
The associated function is invoked by an interrupt handler.

Definition at line 62 of file ch.cpp.

References chVTSetI(), and timer.

Here is the call graph for this function:

void chibios_rt::Timer::Reset (  ) 

Resets the timer.

Note:
It must be called with the interrupts disabled.
The timer MUST be active when this function is invoked.

Definition at line 67 of file ch.cpp.

References chVTResetI(), and timer.

Here is the call graph for this function:

bool chibios_rt::Timer::IsArmed ( void   ) 

Returns the timer status.

Return values:
TRUE The timer is armed.
FALSE The timer already fired its callback.

Definition at line 72 of file ch.cpp.

References chVTIsArmedI, and timer.


Field Documentation

Embedded VirtualTimer structure.

Definition at line 86 of file ch.hpp.

Referenced by IsArmed(), Reset(), and Set().


Generated on Sun Oct 24 2010 09:40:49 for ChibiOS/RT by doxygen 1.7.1