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.