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

Overview

Function definitions for PLIC driver.

Functions

void plic_applyConfig (plic_instance_t *inst)
 Apply stored PLIC configuration to hardware.
u32 plic_claimExtIRQ_m ()
 Claim ID source from external IRQ.
void plic_releaseExtIRQ_m (u32 gateway)
 Release ID source from external IRQ.

PLIC (Get Functions)

Read values from the PLIC hardware registers.

u32 plic_get_threshold (plic_instance_t *inst)
 Read value from PLIC register.
u32 plic_get_priority (plic_instance_t *inst)
 Read value from PLIC register.

PLIC (Set Functions)

Set values to the PLIC hardware registers.

void plic_set_priority (plic_instance_t *inst)
 Set priority value to PLIC register.
void plic_set_enable (plic_instance_t *inst)
 Set enable value to PLIC register.
void plic_set_threshold (plic_instance_t *inst)
 Set threshold value to PLIC register.

Function Documentation

◆ plic_applyConfig()

void plic_applyConfig ( plic_instance_t * inst)

#include <plic.h>

Apply stored PLIC configuration to hardware.

Parameters
instPointer to PLIC instance.
Note
Call this function after making any changes to the plic_instance_t structure to apply those changes to the hardware.

Definition at line 83 of file plic.c.

◆ plic_claimExtIRQ_m()

u32 plic_claimExtIRQ_m ( )

#include <plic.h>

Claim ID source from external IRQ.

Parameters
instPointer to PLIC instance.
Returns
ID source that triggered external IRQ.

Claim ID source from external IRQ.

Definition at line 28 of file plic.c.

◆ plic_get_priority()

u32 plic_get_priority ( plic_instance_t * inst)

#include <plic.h>

Read value from PLIC register.

Parameters
instPointer to PLIC instance.
Returns
Value of the priority.

Definition at line 45 of file plic.c.

◆ plic_get_threshold()

u32 plic_get_threshold ( plic_instance_t * inst)

#include <plic.h>

Read value from PLIC register.

Parameters
instPointer to PLIC instance.
Returns
Value of the threshold.

Definition at line 68 of file plic.c.

◆ plic_releaseExtIRQ_m()

void plic_releaseExtIRQ_m ( u32 gateway)

#include <plic.h>

Release ID source from external IRQ.

Parameters
instPointer to PLIC instance.

Definition at line 34 of file plic.c.

◆ plic_set_enable()

void plic_set_enable ( plic_instance_t * inst)

#include <plic.h>

Set enable value to PLIC register.

Parameters
instPointer to PLIC instance.

Definition at line 50 of file plic.c.

◆ plic_set_priority()

void plic_set_priority ( plic_instance_t * inst)

#include <plic.h>

Set priority value to PLIC register.

Parameters
instPointer to PLIC instance.

Definition at line 40 of file plic.c.

◆ plic_set_threshold()

void plic_set_threshold ( plic_instance_t * inst)

#include <plic.h>

Set threshold value to PLIC register.

Parameters
instPointer to PLIC instance.

Definition at line 63 of file plic.c.