|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "isr.h"Go to the source code of this file.
Macros | |
| #define | PIC_REMAP_OFFSET 0x20 |
| IDT vector at which IRQ 0 is mapped. | |
Typedefs | |
| typedef void(*) | irq_handler_t(struct registers *regs) |
| IRQ handler function type. | |
Functions | |
| void | irq_initialize (void) |
| initialize the IRQ subsystem. | |
| void | irq_register_handler (int irq, irq_handler_t handler) |
| register a handler function for a specific hardware IRQ line. | |
| bool | irq_line_wanted (uint32_t irq) |
| true if the IRQ layer has enabled the line (arch_irq_enable). | |
| #define PIC_REMAP_OFFSET 0x20 |
IDT vector at which IRQ 0 is mapped.
IRQs 0–15 occupy vectors PIC_REMAP_OFFSET through PIC_REMAP_OFFSET+15. Must stay above the CPU exception range (0–31) and must match the value passed to pic_configure() in irq_initialize().
| typedef void(*) irq_handler_t(struct registers *regs) |
IRQ handler function type.
| regs | pointer to the saved register state at the time of the interrupt. |
| void irq_initialize | ( | void | ) |
initialize the IRQ subsystem.
configures the PIC, registers ISR handlers for the 16 hardware IRQ lines, and enables hardware interrupts.
| void irq_register_handler | ( | int | irq, |
| irq_handler_t | handler ) |
register a handler function for a specific hardware IRQ line.
| irq | the IRQ number (0–15). |
| handler | pointer to the handler function to call when this IRQ fires. |