Reference Manual
User Messages and Classes
Generated Header Files
#include "hideos/services.h"
void CurrentTime(ClockTime&);
Return the time which has elapsed since the system booted.
TickTimer* UseTickTimer();
Return a ticktimer if one is available. This class manages a pool of
ticktimers. This is the function used to check one out of the pool.
void ReleaseTickTimer(TickTimer*& t);
Put a ticktimer back into the ticktimer pool.
void AddTickTimer(TickTimer* t);
Low level function used to register a tick timer. This function is used
by the chip libraries to add ticktimer to the pool.
#include "hideos/services.h"
unsigned long sec
Seconds which have elapsed since the last boot.
unsigned long sec
Microseconds within the second.
#include "hideos/ticktimer.h"
typedef void* (*IRQ_TICK_FUNC)(void*);
virtual unsigned long Resolution()=0;
Implemented by subclass. Return the resolution of the timer in ticks
per second.
virtual unsigned long CurrentValue()=0;
Implemented by subclass. Return the current tick count in the tick timer
count register.
virtual void CompareValue(unsigned long)=0;
Implemented by subclass. Set the timer comparison value. Many timer
allow an interrupt based on a current count match with a value in a
compare register.
virtual void Clear()=0;
virtual void Disable()=0;
virtual void Enable()=0;
Implemented by subclass. Clear the timer's count register. Stop the timer
from counting. Start the timer counting.
virtual void ResetMode()=0;
Put the counter into a reset on compare register match. The count register
will be set to zero each time the count reaches the value in the compare
register.
virtual void CycleMode()=0;
Counter will count continually, at overflow, the count just start over
at zero.
virtual void EnableInterrupt()=0;
virtual void DisableInterrupt()=0;
Enable and disable the timer interrupt generating facility.
virtual void SetIntLevel(int level)=0;
Set the level at which the timer will generate interrupts. Three is a
good level to use.
virtual void PeriodicInterrupt(ulong usec,int level,
IRQ_TICK_FUNC func, void* parm)=0;
Set up interrupt handler func to be called with parameter parm
when the timer generates an interrupt at level level. The timer
will be set up to generate interrupts every usec microseconds.
This is a time saving method of registering a periodic interrupt handler.
virtual void SetIntFunction(IRQ_TICK_FUNC func,void* parm)=0;
Set up interrupt handler func to be called with parameter parm
when the timer generates an interrupt.