Loading...
Searching...
No Matches
plic.h File Reference

Platform-Level interrupt controller driver. More...

Detailed Description

Platform-Level interrupt controller driver.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net

Definition in file plic.h.

Go to the source code of this file.

typedef void(* plic_isr_cb_t) (int irq)
 PLIC callback declaration.
 
void plic_init (void)
 Initialize the Platform-level interrupt controller.
 
void plic_disable_interrupt (unsigned irq)
 Disable an interrupt on the PLIC.
 
void plic_enable_interrupt (unsigned irq)
 Enable an interrupt on the PLIC.
 
void plic_set_priority (unsigned irq, unsigned priority)
 Set an interrupt priority.
 
void plic_set_isr_cb (unsigned irq, plic_isr_cb_t cb)
 Set the interrupt callback.
 
void plic_isr_handler (void)
 External ISR callback.
 

Typedef Documentation

◆ plic_isr_cb_t

typedef void(* plic_isr_cb_t) (int irq)

PLIC callback declaration.

Parameters
irqInterrupt number

Definition at line 31 of file plic.h.

Function Documentation

◆ plic_disable_interrupt()

void plic_disable_interrupt ( unsigned  irq)

Disable an interrupt on the PLIC.

Parameters
irqInterrupt number

◆ plic_enable_interrupt()

void plic_enable_interrupt ( unsigned  irq)

Enable an interrupt on the PLIC.

Parameters
irqInterrupt number

◆ plic_isr_handler()

void plic_isr_handler ( void  )

External ISR callback.

Interrupt handler for the PLIC

Must be called from the trap handler when an interrupt from the PLIC is pending

◆ plic_set_isr_cb()

void plic_set_isr_cb ( unsigned  irq,
plic_isr_cb_t  cb 
)

Set the interrupt callback.

Parameters
irqInterrupt number
cbCallback to call on interrupt

◆ plic_set_priority()

void plic_set_priority ( unsigned  irq,
unsigned  priority 
)

Set an interrupt priority.

Parameters
irqInterrupt number
priorityPriority