Function definitions for IRQ driver.
Functions | |
| void | irq_enable (void) |
| Enable Global Interrupts. | |
| void | irq_disable (void) |
| Disable Global Interrupts. | |
| void | irq_setType (cpu_irq_t enable) |
| Enable specific CPU interrupt sources. | |
| void | irq_clearType (cpu_irq_t disable) |
| Disable specific CPU interrupt sources. | |
| void | irq_registerExt (u32 gateway, irq_handler_t handler) |
| Register a handler for an External Interrupt (PLIC). | |
| void | irq_setTrapVector (void(*trap_vector)(void)) |
| Set the Machine Trap Vector (mtvec). | |
| void irq_clearType | ( | cpu_irq_t | disable | ) |
| void irq_disable | ( | void | ) |
| void irq_enable | ( | void | ) |
| void irq_registerExt | ( | u32 | gateway, |
| irq_handler_t | handler ) |
#include <irq.h>
Register a handler for an External Interrupt (PLIC).
Writes the function pointer to the software vector table.
| gateway | The PLIC Interrupt ID (Source ID) to register. |
| handler | Pointer to the ISR function. |
Register a handler for an External Interrupt (PLIC).
| gateway | The PLIC ID (Gateway ID) to register (0-63). |
| handler | Function pointer to the ISR. |
| void irq_setTrapVector | ( | void(* | trap_vector )(void) | ) |
#include <irq.h>
Set the Machine Trap Vector (mtvec).
Configures the address the CPU jumps to when an exception or interrupt occurs.
| trap_vector | Function pointer to the assembly trap entry point. |
| trap_vector | Function pointer to the trap entry assembly code. |
| void irq_setType | ( | cpu_irq_t | enable | ) |
#include <irq.h>
Enable specific CPU interrupt sources.
Sets the corresponding bit in the mie (Machine Interrupt Enable) CSR.
| enable | Bitmask of interrupts to enable (e.g., IRQ_TIMER | IRQ_EXTERNAL). |
| enable | Bitmask of interrupts to enable (e.g., IRQ_TIMER | IRQ_EXTERNAL). |