Skip to main content

Module pic

Module pic 

Source
Expand description

8259 Programmable Interrupt Controller (PIC) driver Inspired by MaestroOS pic.rs

The PIC handles hardware interrupts (IRQs) and maps them to CPU interrupt vectors. We remap IRQs to vectors 0x20-0x2F.

Constants§

PIC1_OFFSET
IRQ offset for master PIC (IRQ0 -> interrupt 0x20)
PIC2_OFFSET
IRQ offset for slave PIC (IRQ8 -> interrupt 0x28)

Functions§

disable
Disable all IRQs on both PICs.
disable_irq
Disable a specific IRQ line.
disable_permanently
Disable the 8259 PIC permanently by masking all IRQs.
enable_irq
Enable a specific IRQ line.
end_of_interrupt
Send End-Of-Interrupt to the PIC for the given IRQ.
init
Initialize the PIC with the given offsets.