Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
riscv_plic.h File Reference

Driver for Platform Level Interrupt Controller (PLIC) More...

#include <zephyr/device.h>

Go to the source code of this file.

Functions

void riscv_plic_irq_enable (uint32_t irq)
 Enable interrupt.
 
void riscv_plic_irq_disable (uint32_t irq)
 Disable interrupt.
 
int riscv_plic_irq_is_enabled (uint32_t irq)
 Check if an interrupt is enabled.
 
void riscv_plic_set_priority (uint32_t irq, uint32_t prio)
 Set interrupt priority.
 
int riscv_plic_irq_set_affinity (uint32_t irq, uint32_t cpumask)
 Set IRQ affinity.
 
void riscv_plic_irq_set_pending (uint32_t irq)
 Set interrupt as pending.
 
unsigned int riscv_plic_get_irq (void)
 Get active interrupt ID.
 
const struct deviceriscv_plic_get_dev (void)
 Get active interrupt controller device.
 

Detailed Description

Driver for Platform Level Interrupt Controller (PLIC)

Function Documentation

◆ riscv_plic_get_dev()

const struct device * riscv_plic_get_dev ( void )

Get active interrupt controller device.

Note
Should be called with interrupt locked
Returns
Returns device pointer of the active interrupt device

◆ riscv_plic_get_irq()

unsigned int riscv_plic_get_irq ( void )

Get active interrupt ID.

Note
Should be called with interrupt locked
Returns
Returns the ID of an active interrupt

◆ riscv_plic_irq_disable()

void riscv_plic_irq_disable ( uint32_t irq)

Disable interrupt.

Parameters
irqMulti-level encoded interrupt ID

◆ riscv_plic_irq_enable()

void riscv_plic_irq_enable ( uint32_t irq)

Enable interrupt.

Parameters
irqMulti-level encoded interrupt ID

◆ riscv_plic_irq_is_enabled()

int riscv_plic_irq_is_enabled ( uint32_t irq)

Check if an interrupt is enabled.

Parameters
irqMulti-level encoded interrupt ID
Returns
Returns true if interrupt is enabled, false otherwise

◆ riscv_plic_irq_set_affinity()

int riscv_plic_irq_set_affinity ( uint32_t irq,
uint32_t cpumask )

Set IRQ affinity.

Parameters
irqIRQ line.
cpumaskCPU bit mask.
Returns
0 if success, negative errno value otherwise

◆ riscv_plic_irq_set_pending()

void riscv_plic_irq_set_pending ( uint32_t irq)

Set interrupt as pending.

Parameters
irqMulti-level encoded interrupt ID

◆ riscv_plic_set_priority()

void riscv_plic_set_priority ( uint32_t irq,
uint32_t prio )

Set interrupt priority.

Parameters
irqMulti-level encoded interrupt ID
priointerrupt priority