|
ginnOS
The reference: libc, the libraries and the kernel
|
Macros | |
| #define | PIC1_COMMAND_PORT 0x20 |
| PIC I/O port addresses. | |
| #define | PIC1_DATA_PORT 0x21 |
| #define | PIC2_COMMAND_PORT 0xA0 |
| #define | PIC2_DATA_PORT 0xA1 |
Enumerations | |
| enum | { PIC_ICW1_ICW4 = 0x01 , PIC_ICW1_SINGLE = 0x02 , PIC_ICW1_INTERVAL4 = 0x04 , PIC_ICW1_LEVEL = 0x08 , PIC_ICW1_INITIALIZE = 0x10 } |
| ICW1 flags. More... | |
| enum | { PIC_ICW4_8086 = 0x01 , PIC_ICW4_AUTO_EOI = 0x02 , PIC_ICW4_BUFFER_MASTER = 0x04 , PIC_ICW4_BUFFER_SLAVE = 0x00 , PIC_ICW4_BUFFERED = 0x08 , PIC_ICW4_SFNM = 0x10 } |
| ICW4 flags. More... | |
| enum | { PIC_CMD_END_OF_INTERRUPT = 0x20 , PIC_CMD_READ_IRR = 0x0A , PIC_CMD_READ_ISR = 0x0B } |
| PIC command bytes. More... | |
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. | |
| #define PIC1_COMMAND_PORT 0x20 |
PIC I/O port addresses.
| #define PIC1_DATA_PORT 0x21 |
| #define PIC2_COMMAND_PORT 0xA0 |
| #define PIC2_DATA_PORT 0xA1 |
| anonymous enum |
| anonymous enum |
| anonymous enum |
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.