KernOS
|
#include <pit.h>
#include <common.h>
#include <utilities.h>
#include <interrupt.h>
#include <ports.h>
#include <pic.h>
Go to the source code of this file.
Namespaces | |
INTRP | |
interrupt namespace | |
TIMER | |
Timer namespace. | |
INIT | |
contains all kernel initialization routines | |
Enumerations | |
enum | TIMER::PORT : uint8_t { TIMER::CHANNEL_O = 0x40, TIMER::CHANNEL_1 = 0x41, TIMER::CHANNEL_2 = 0x42, TIMER::COMMAND = 0x43 } |
enum | TIMER::CHANNEL : uint8_t { TIMER::TIMER0 = 0x00, TIMER::TIMER1 = 0x40, TIMER::TIMER2 = 0x80 } |
enum | TIMER::ACCESSMODE : uint8_t { TIMER::LATCH = 0x00, TIMER::LO_ONLY = 0x10, TIMER::HI_ONLY = 0x20, TIMER::HI_LO = 0x30 } |
enum | TIMER::OPMODE : uint8_t { TIMER::COUNTDOWN = 0x0, TIMER::ONESHOT = 0x2, TIMER::RATE_GENERATOR = 0x4, TIMER::SQUAREWAVE_GENERATOR = 0x6, TIMER::SOFTWARE_STROBE = 0x8, TIMER::HARDWARE_STROBE = 0xA, TIMER::RATE_GENERATOR2 = 0xC, TIMER::SQUAREWAVE_GENERATOR2 = 0xE } |
enum | TIMER::DECIMALMODE : uint8_t { TIMER::BINARY = 0x0, TIMER::BCD = 0x1 } |
Functions | |
void | INTRP::TimerInterruptHandler () |
Timer interrupt handler. More... | |
void | TIMER::PIT_825x () |
void | INIT::PIT () |
Initializes programmable interval timer. More... | |
Variables | |
const uint32_t | TIMER::BASE_FREQ = 1'193'182 |
14.31818 MHz / 12 (due to hardware historical reason) More... | |
const uint16_t | TIMER::TICKS_PER_SECOND = 1'000 |