Commit 97a9955b authored by Mathieu Maret's avatar Mathieu Maret

Correct irq number for slave pic

parent 3fceb00a
......@@ -49,7 +49,7 @@ void enableIrq(int irq)
outb(PIC_MASTER_DATA, (status | (1 << irq)));
} else {
uint8_t status = inb(PIC_SLAVE_DATA);
outb(PIC_SLAVE_DATA, (status | (1 << irq)));
outb(PIC_SLAVE_DATA, (status | (1 << (irq - 8))));
}
}
......@@ -60,6 +60,6 @@ void disableIrq(int irq)
outb(PIC_MASTER_DATA, (status & ~(1 << irq)));
} else {
uint8_t status = inb(PIC_SLAVE_DATA);
outb(PIC_SLAVE_DATA, (status & ~(1 << irq)));
outb(PIC_SLAVE_DATA, (status & ~(1 << (irq - 8))));
}
}
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