|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "common/stdint.h"Go to the source code of this file.
Functions | |
| void | pic_configure (uint8_t offset_master, uint8_t offset_slave) |
| configure the 8259A PIC. | |
| void | pic_send_eoi (int irq) |
| send an End-of-Interrupt (EOI) signal to the PIC. | |
| void | pic_disable (void) |
| disable both PICs by masking all IRQ lines. | |
| void | pic_mask (int irq) |
| mask (disable) a specific IRQ line. | |
| void | pic_unmask (int irq) |
| unmask (enable) a specific IRQ line. | |
| uint16_t | pic_read_irr (void) |
| read the Interrupt Request Register (IRR) from both PICs. | |
| uint16_t | pic_read_isr (void) |
| read the In-Service Register (ISR) from both PICs. | |
configure the 8259A PIC.
remaps IRQ lines to the specified IDT vector offsets.
| offset_master | base vector offset for the master PIC (IRQ 0–7). |
| offset_slave | base vector offset for the slave PIC (IRQ 8–15). |
| void pic_send_eoi | ( | int | irq | ) |
send an End-of-Interrupt (EOI) signal to the PIC.
if the IRQ came from the slave PIC, sends EOI to both slave and master.
| irq | the IRQ number (0–15). |
| void pic_disable | ( | void | ) |
disable both PICs by masking all IRQ lines.
| void pic_mask | ( | int | irq | ) |
mask (disable) a specific IRQ line.
| irq | the IRQ number (0–15). |
| void pic_unmask | ( | int | irq | ) |
unmask (enable) a specific IRQ line.
| irq | the IRQ number (0–15). |
| uint16_t pic_read_irr | ( | void | ) |
read the Interrupt Request Register (IRR) from both PICs.
| uint16_t pic_read_isr | ( | void | ) |
read the In-Service Register (ISR) from both PICs.