Correct irq number for slave pic
This commit is contained in:
parent
3fceb00ab4
commit
97a9955b21
4
pic.c
4
pic.c
@ -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))));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user