The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
irq.c File Reference
#include "irq.h"
#include "pic.h"
#include "apic.h"
#include "io.h"
#include "isr.h"
#include "common/stdio.h"
#include "kernel/assert.h"

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.

Function Documentation

◆ irq_initialize()

void irq_initialize ( void )

initialize the IRQ subsystem.

configures the PIC, registers ISR handlers for the 16 hardware IRQ lines, and enables hardware interrupts.

◆ irq_register_handler()

void irq_register_handler ( int irq,
irq_handler_t handler )

register a handler function for a specific hardware IRQ line.

Parameters
irqthe IRQ number (0–15).
handlerpointer to the handler function to call when this IRQ fires.