tac0S
Template Affectional Command Operating System
Public Member Functions | List of all members
Timer Class Reference

The following class defines a hardware timer. More...

#include <timer.h>

Public Member Functions

 Timer (VoidFunctionPtr timerHandler, int callArg, bool doRandom)
 Timer::Timer Initialize a hardware timer device. Save the place to call on each interrupt, and then arrange for the timer to start generating interrupts. More...
 
void TimerExpired ()
 Timer::TimerExpired Routine to simulate the interrupt generated by the hardware timer device. Schedule the next interrupt, and invoke the interrupt handler.
 
int TimeOfNextInterrupt ()
 Timer::TimeOfNextInterrupt. More...
 

Detailed Description

The following class defines a hardware timer.

Constructor & Destructor Documentation

Timer::Timer ( VoidFunctionPtr  timerHandler,
int  callArg,
bool  doRandom 
)

Timer::Timer Initialize a hardware timer device. Save the place to call on each interrupt, and then arrange for the timer to start generating interrupts.

Parameters
timerHandleris the interrupt handler for the timer device. It is called with interrupts disabled every time the the timer expires.
callArgis the parameter to be passed to the interrupt handler.
doRandom– if true, arrange for the interrupts to occur at random, instead of fixed, intervals.

Member Function Documentation

int Timer::TimeOfNextInterrupt ( )

Timer::TimeOfNextInterrupt.

Returns
Return when the hardware timer device will next cause an interrupt. If randomize is turned on, make it a (pseudo-)random delay.

The documentation for this class was generated from the following files: