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
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_set_priority (plic_instance_t *inst)
 Set priority value to PLIC register.
u32 plic_get_priority (plic_instance_t *inst)
 Read value from 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.
u32 plic_get_threshold (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.