correct outb usage
This commit is contained in:
parent
200c311bcf
commit
3fceb00ab4
8
pic.c
8
pic.c
@ -46,10 +46,10 @@ void enableIrq(int irq)
|
|||||||
{
|
{
|
||||||
if (irq < 8) {
|
if (irq < 8) {
|
||||||
uint8_t status = inb(PIC_MASTER_DATA);
|
uint8_t status = inb(PIC_MASTER_DATA);
|
||||||
outb((status | (1 << irq)), PIC_MASTER_DATA);
|
outb(PIC_MASTER_DATA, (status | (1 << irq)));
|
||||||
} else {
|
} else {
|
||||||
uint8_t status = inb(PIC_SLAVE_DATA);
|
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) {
|
if (irq < 8) {
|
||||||
uint8_t status = inb(PIC_MASTER_DATA);
|
uint8_t status = inb(PIC_MASTER_DATA);
|
||||||
outb((status & ~(1 << irq)), PIC_MASTER_DATA);
|
outb(PIC_MASTER_DATA, (status & ~(1 << irq)));
|
||||||
} else {
|
} else {
|
||||||
uint8_t status = inb(PIC_SLAVE_DATA);
|
uint8_t status = inb(PIC_SLAVE_DATA);
|
||||||
outb((status & ~(1 << irq)), PIC_SLAVE_DATA);
|
outb(PIC_SLAVE_DATA, (status & ~(1 << irq)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user