Last change: 30/07/2002
Author: Luiz Henrique Shigunov
0x00 - Alloc - Allocate a counter
0x01 - Free - Free a counter
0x02 - Setup - Setup a counter
This page describes the TimerController_i386 interface which provides access to the timer controller.
The PIT is the component responsible for counters. PC/AT and compatibles have one and, some times, two PITs.
Each PIT has 3 counters (0-2). Each counter is independent from each other and can operate in 6 different modes. The most used modes in the PC/AT are mode 2 (rate generator) and mode 3 (square-wave generator).
In PC/AT counters are assigned this way:
|0||assigned to IRQ0|
Counter 1 generates a square-wave responsible for memory refresh in some systems. Counter 2 is used in PC/AT to generate sounds, it's not a sound card!
Counters are always enabled. There's no way to disable them.
int TimerController_i386_Alloc(SysModManager_Module *module, unsigned int timer);
This functions allocates counter timer for module.
int TimerController_i386_Free(SysModManager_Module *module, unsigned int timer);
This function frees counter timer used by module.
int TimerController_i386_Setup(SysModManager_Module *module, unsigned int timer, unsigned int value, unsigned int config);
This function setups counter timer used by module.
value is the value to be counted.
config value must be the sum of: