11#define PIT_PORT_CONTROL 0x43
12#define PIT_PORT_COUNTER(CHANNEL) (0x40 + (CHANNEL))
65 else if (frequency >
PIT_HZ)
75 count = (
PIT_HZ + frequency / 2) / frequency;
#define ASSERT(CONDITION)
This is outside the header guard so that debug.h may be included multiple times with different settin...
enum intr_level intr_disable(void)
Disables interrupts and returns the previous interrupt status.
enum intr_level intr_set_level(enum intr_level level)
Enables or disables interrupts as specified by LEVEL and returns the previous interrupt status.
intr_level
Interrupts on or off?
static void outb(uint16_t port, uint8_t data)
Writes byte DATA to PORT.
#define PIT_HZ
PIT cycles per second.
void pit_configure_channel(int channel, int mode, int frequency)
Configure the given CHANNEL in the PIT.
#define PIT_PORT_COUNTER(CHANNEL)
Counter port.
#define PIT_PORT_CONTROL
Interface to 8254 Programmable Interrupt Timer (PIT).
static enum @0 mode
Transmission mode.
unsigned short int uint16_t
An ATA channel (aka controller).