Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
irq.h File Reference
#include "soc.h"
#include "type.h"
#include "riscv.h"
#include "plic/plic.h"

Go to the source code of this file.

Overview

RISC-V Core Interrupt Handling and Vector Table.

Author
Efinix Inc

This file provides APIs to control the CPU's global interrupt state (MIE bit in mstatus) and individual interrupt sources (mie register).

Definition in file irq.h.

Typedefs

typedef int(* irq_handler_t) (void)
 Standard Interrupt Handler Function Pointer.

Enumerations

enum  cpu_irq_t { IRQ_SOFTWARE = MIE_MSIE , IRQ_TIMER = MIE_MTIE , IRQ_EXTERNAL = MIE_MEIE }
 CPU Interrupt Type (Standard RISC-V MIE bits). More...

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).

Variables

int(* interrupt_vector_table [64])(void)
 Global Interrupt Vector Table.