wavelength 1.0.0
Loading...
Searching...
No Matches
PeriodicTimer Class Reference

A hardware timer that wakes one thread at a fixed interval. More...

#include <periodictimer.h>

Public Member Functions

int Init ()
 Allocate a 32-bit system clock timer with Handler() at a 6 millisecond interval.
int Start ()
 Start the timer.
int Free ()
 Release the timer.
int Stop ()
 Stop the timer.

Static Public Member Functions

static unsigned int Handler (void *common)
 Wake the timer's thread.

Public Attributes

int mThread
int mTimer
unsigned int mInterval

Detailed Description

A hardware timer that wakes one thread at a fixed interval.

The class is not polymorphic and emits no RTTI. Its name is inferred from its routines.

Member Function Documentation

◆ Handler()

unsigned int PeriodicTimer::Handler ( void * common)
static

Wake the timer's thread.

The timer runs it in interrupt context.

Parameters
commonThe PeriodicTimer.
Returns
The interval, which schedules the next compare.
Ghidra address:
NTSC-U/C: 0x00000e08
Ghidra address:
PAL: 0x00000e08

◆ Init()

int PeriodicTimer::Init ( )

Allocate a 32-bit system clock timer with Handler() at a 6 millisecond interval.

Returns
Zero.
Ghidra address:
NTSC-U/C: 0x00000e74
Ghidra address:
PAL: 0x00000e74

◆ Start()

int PeriodicTimer::Start ( )

Start the timer.

Returns
Zero.
Ghidra address:
NTSC-U/C: 0x00000efc
Ghidra address:
PAL: 0x00000efc

◆ Free()

int PeriodicTimer::Free ( )

Release the timer.

Returns
Zero.
Ghidra address:
NTSC-U/C: 0x00000f24
Ghidra address:
PAL: 0x00000f24

◆ Stop()

int PeriodicTimer::Stop ( )

Stop the timer.

Returns
Zero.
Ghidra address:
NTSC-U/C: 0x00000f4c
Ghidra address:
PAL: 0x00000f4c

Member Data Documentation

◆ mThread

int PeriodicTimer::mThread

Thread the timer wakes.

◆ mTimer

int PeriodicTimer::mTimer

Hardware timer identifier.

◆ mInterval

unsigned int PeriodicTimer::mInterval

Interval in system clock cycles.


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