Code: Select all
void timer_set_freq(uint16 freq) {
uint32 divisor = 1193180 / freq;
outb(0x43, 0x34); // according to the wiki this byte should be 34 and not 36
outb(0x40, divisor & 0xFF);
outb(0x40, (divisor >> 8) & 0xFF);
}Code: Select all
void timer_set_freq(uint16 freq) {
uint32 divisor = 1193180 / freq;
outb(0x43, 0x34); // according to the wiki this byte should be 34 and not 36
outb(0x40, divisor & 0xFF);
outb(0x40, (divisor >> 8) & 0xFF);
}