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

RISCV CLIC interrupt controller definitions. More...

Detailed Description

RISCV CLIC interrupt controller definitions.

RISCV implementations using this peripheral must define the CLIC_BASE_ADDR, in order to use the PLIC as interrupt controller. Also required is CLIC_NUM_INTERRUPTS.

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

Definition in file clic.h.

#include "cpu_conf.h"
+ Include dependency graph for clic.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

typedef void(* clic_isr_cb_t) (unsigned irq)
 CLIC callback declaration.
 
 clic_clicint_t
 
struct __attribute ((packed))
 RISC-V CLIC per interrupt configuration registers.
 
void clic_init (void)
 Initialize the CLIC interrupt controller.
 
void clic_enable_interrupt (unsigned irq, unsigned priority)
 Enable a single interrupt.
 
void clic_disable_interrupt (unsigned irq)
 Disable a single interrupt.
 
void clic_set_priority (unsigned irq, unsigned priority)
 Set the priority of an interrupt.
 
void clic_set_handler (unsigned irq, clic_isr_cb_t cb)
 Set the handler for an interrupt.
 
void clic_isr_handler (uint32_t irq)
 CLIC interrupt handler.
 

Typedef Documentation

◆ clic_isr_cb_t

typedef void(* clic_isr_cb_t) (unsigned irq)

CLIC callback declaration.

Parameters
irqInterrupt number

Definition at line 35 of file clic.h.

Function Documentation

◆ __attribute()

struct __attribute ( (packed)  )

RISC-V CLIC per interrupt configuration registers.

< Interrupt pending

< Interrupt enable

< Interrupt attributes

< Interrupt control

Definition at line 35 of file clic.h.

◆ clic_disable_interrupt()

void clic_disable_interrupt ( unsigned  irq)

Disable a single interrupt.

Parameters
irqInterrupt number to disable

◆ clic_enable_interrupt()

void clic_enable_interrupt ( unsigned  irq,
unsigned  priority 
)

Enable a single interrupt.

Parameters
irqInterrupt number to enable
priorityPriority level to configure

◆ clic_set_handler()

void clic_set_handler ( unsigned  irq,
clic_isr_cb_t  cb 
)

Set the handler for an interrupt.

Parameters
irqInterrupt number to configure
cbCallback handler to configure

◆ clic_set_priority()

void clic_set_priority ( unsigned  irq,
unsigned  priority 
)

Set the priority of an interrupt.

Parameters
irqInterrupt number to configure
priorityPriority level to configure

Variable Documentation

◆ clic_clicint_t

clic_clicint_t

Definition at line 45 of file clic.h.