Commit 3fceb00a authored by Mathieu Maret's avatar Mathieu Maret

correct outb usage

parent 200c311b
......@@ -46,10 +46,10 @@ void enableIrq(int irq)
{
if (irq < 8) {
uint8_t status = inb(PIC_MASTER_DATA);
outb((status | (1 << irq)), PIC_MASTER_DATA);
outb(PIC_MASTER_DATA, (status | (1 << irq)));
} else {
uint8_t status = inb(PIC_SLAVE_DATA);
outb((status | (1 << irq)), PIC_SLAVE_DATA);
outb(PIC_SLAVE_DATA, (status | (1 << irq)));
}
}
......@@ -57,9 +57,9 @@ void disableIrq(int irq)
{
if (irq < 8) {
uint8_t status = inb(PIC_MASTER_DATA);
outb((status & ~(1 << irq)), PIC_MASTER_DATA);
outb(PIC_MASTER_DATA, (status & ~(1 << irq)));
} else {
uint8_t status = inb(PIC_SLAVE_DATA);
outb((status & ~(1 << irq)), PIC_SLAVE_DATA);
outb(PIC_SLAVE_DATA, (status & ~(1 << irq)));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment