Fix PIC, add small delays when initializing
This commit is contained in:
@ -31,13 +31,7 @@ void intr_pit_wait(uint32_t ms) {
|
||||
while (PIT_TICKS - now < ms);
|
||||
}
|
||||
|
||||
void intr_pit_intr(IntrStackFrame *frame) {
|
||||
PIT_TICKS++;
|
||||
}
|
||||
|
||||
void intr_pit_init(void) {
|
||||
intr_attchhandler(&intr_pit_intr, INTR_IRQBASE+0);
|
||||
|
||||
uint32_t hz = 1000;
|
||||
uint32_t div = PIT_FREQ / hz;
|
||||
io_out8(PIT_CMD, PIT_CMD_BINARY | PIT_CMD_MODE3 | PIT_CMD_RW_BOTH | PIT_CMD_COUNTER0);
|
||||
|
||||
Reference in New Issue
Block a user