RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches
plic.c File Reference
#include <stdio.h>
#include <stdint.h>
#include "plic/plic.h"

Go to the source code of this file.

Overview

PLIC driver implementation.

Implements the functions defined in plic.h for controlling PLIC input/output and interrupts on the EfxSapphireSoC platform.

Definition in file plic.c.

Macros

#define PLIC   ((plic_hwreg_t *)SYSTEM_PLIC_CTRL)

Functions

u32 plic_claimExtIRQ_m ()
 Initialize the PLIC instance with a base address. Calculates the internal pointers for the register blocks. This can called once during system initialization -> BSP_init something like that !!
void plic_releaseExtIRQ_m (u32 gateway)
 Release ID source from external IRQ.
void plic_setPriority (plic_instance_t *inst)
 Set priority value to PLIC register.
u32 plic_getPriority (plic_instance_t *inst)
 Read value from PLIC register.
void plic_setEnable (plic_instance_t *inst)
 Set enable value to PLIC register.
void plic_setThreshold (plic_instance_t *inst)
 Set threshold value to PLIC register.
u32 plic_getThreshold (plic_instance_t *inst)
 Read value from PLIC register.
u32 plic_claim (plic_instance_t *inst)
void plic_release (plic_instance_t *inst)
void plic_applyConfig (plic_instance_t *inst)
 Apply stored PLIC configuration to hardware.

Macro Definition Documentation

◆ PLIC

#define PLIC   ((plic_hwreg_t *)SYSTEM_PLIC_CTRL)

Definition at line 21 of file plic.c.

Function Documentation

◆ plic_claim()

u32 plic_claim ( plic_instance_t * inst)

Definition at line 73 of file plic.c.

◆ plic_release()

void plic_release ( plic_instance_t * inst)

Definition at line 78 of file plic.c.