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
clint.c File Reference
#include "clint/clint.h"

Go to the source code of this file.

Overview

CLINT driver implementation.

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

Definition in file clint.c.

Macros

#define CLINT   ((clint_hwreg_t *)SYSTEM_CLINT_CTRL)
 Pointer to the CLINT hardware registers.

Functions

u32 clint_getTimeLow ()
 Reads the low part of the current time.
u32 clint_getTimeHigh ()
 Reads the high part of the current time.
u32 clint_get_SoftInterrupt (u32 hart_id)
 Obtain the current state of the software interrupt for a specific hart.
u64 clint_getTime ()
 Reads the current time value from the CLINT TIME register.
void clint_setCmp (u64 cmp, u32 hart_id)
 This function sets the compare value for the CLINT CMP register for a specific hardware thread.
void clint_uDelay (u32 usec, u32 hz)
 This function introduces a microsecond delay using the CLINT TIME register.
void clint_set_SoftInterrupt (clint_msip_t enable, u32 hart_id)
 Sets the software interrupt state for a specific hart.
double clint_timerSub (u64 t0, u64 t1)
 Get the time difference between t0 and t1.

Macro Definition Documentation

◆ CLINT

#define CLINT   ((clint_hwreg_t *)SYSTEM_CLINT_CTRL)

Pointer to the CLINT hardware registers.

Definition at line 21 of file clint.c.