The programmable Intervall Timer is a chip which allows controlling 3 different timers. The first timer can produce a hardware IRQ and is mainly used for things like task scheduling. The second timer is not used anymore on modern systems and the third timer is used to control the PC Speaker frequency.
For more information take a look at http://wiki.osdev.org/Programmable_Interval_Timer
◆ PIT_MODE_HARDWARE_STROBE
#define PIT_MODE_HARDWARE_STROBE 5 |
Definition at line 48 of file pit.h.
◆ PIT_MODE_INTERRUPT_ON_TERMINAL
#define PIT_MODE_INTERRUPT_ON_TERMINAL 0 |
Definition at line 43 of file pit.h.
◆ PIT_MODE_ONE_SHOT
#define PIT_MODE_ONE_SHOT 1 |
Definition at line 44 of file pit.h.
◆ PIT_MODE_RATE_GENERATOR
#define PIT_MODE_RATE_GENERATOR 2 |
Definition at line 45 of file pit.h.
◆ PIT_MODE_SOFTWARE_STROBE
#define PIT_MODE_SOFTWARE_STROBE 4 |
Definition at line 47 of file pit.h.
◆ PIT_MODE_SQUARE_WAVE_GENERATOR
#define PIT_MODE_SQUARE_WAVE_GENERATOR 3 |
Definition at line 46 of file pit.h.
◆ pitSetFrequency()
void pitSetFrequency |
( |
uint32_t |
channel, |
|
|
uint32_t |
frequency |
|
) |
| |
Set frequency of the programmable interval timer.
This function allows setting the timer on one of the three timer channels of the PIT.
- Warning
- The frequency must be between 19 Hz and 1193182 Hz
- Parameters
-
channel | Either 0, 1 or 2 |
frequency | The frequency to set |
Definition at line 72 of file pit.c.
◆ pitSetValue()
void pitSetValue |
( |
uint32_t |
channel, |
|
|
uint32_t |
mode, |
|
|
uint16_t |
value |
|
) |
| |
Internal function to set a value of the PIT.
- Parameters
-
channel | Either 0, 1 or 2 |
mode | One of the Timer modes |
value | The value to set |
Definition at line 53 of file pit.c.