NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Machine System Timer (MTIME) HW driver header file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | neorv32_mtime_t |
Macros | |
IO Device: Machine System Timer (MTIME) | |
#define | NEORV32_MTIME ((neorv32_mtime_t*) (NEORV32_MTIME_BASE)) |
Functions | |
Prototypes | |
int | neorv32_mtime_available (void) |
void | neorv32_mtime_set_time (uint64_t time) |
uint64_t | neorv32_mtime_get_time (void) |
void | neorv32_mtime_set_timecmp (uint64_t timecmp) |
uint64_t | neorv32_mtime_get_timecmp (void) |
void | neorv32_mtime_set_unixtime (uint64_t unixtime) |
uint64_t | neorv32_mtime_get_unixtime (void) |
Machine System Timer (MTIME) HW driver header file.
#define NEORV32_MTIME ((neorv32_mtime_t*) (NEORV32_MTIME_BASE)) |
MTIME module hardware access (neorv32_mtime_t)
int neorv32_mtime_available | ( | void | ) |
Check if MTIME unit was synthesized.
uint64_t neorv32_mtime_get_time | ( | void | ) |
Get current system time.
uint64_t neorv32_mtime_get_timecmp | ( | void | ) |
Get compare time register (MTIMECMP).
uint64_t neorv32_mtime_get_unixtime | ( | void | ) |
Get Unix time from TIME.
void neorv32_mtime_set_time | ( | uint64_t | time | ) |
Set current system time.
[in] | time | New system time (uint64_t) |
void neorv32_mtime_set_timecmp | ( | uint64_t | timecmp | ) |
Set compare time register (MTIMECMP) for generating interrupts.
[in] | timecmp | System time for interrupt (uint64_t) |
void neorv32_mtime_set_unixtime | ( | uint64_t | unixtime | ) |
Set TIME to Unix time.
[in] | unixtime | Unix time since 00:00:00 UTC, January 1st, 1970 in seconds. |