k-tana-zero/k/pic.c

25 lines
490 B
C

#include "pic.h"
#include "io.h"
void remap_pic(void)
{
// ICW1
outb(MASTER_PORT_A, ICW1_INIT | ICW1_ICW4);
outb(SLAVE_PORT_A, ICW1_INIT | ICW1_ICW4);
// ICW2
outb(MASTER_PORT_B, ICW2_M_OFFSET);
outb(SLAVE_PORT_B, ICW2_S_OFFSET);
// ICW3
outb(MASTER_PORT_B, PIC_PIN_2);
outb(SLAVE_PORT_B, 2);
// ICW4
outb(MASTER_PORT_B, ICW4_INIT);
outb(SLAVE_PORT_B, ICW4_INIT);
// OCW1
outb(MASTER_PORT_B, PIC_PIN_0); // masking PIT for now
}