cpu.h File Reference

Basic definitions for the RISC-V common module. More...

Detailed Description

Basic definitions for the RISC-V common module.

When ever you want to do something hardware related, that is accessing MCUs registers, just include this file. It will then make sure that the MCU specific headers are included.

Ken Rabold

Definition in file cpu.h.

#include "thread.h"
#include "vendor/platform.h"
#include "vendor/plic_driver.h"
+ Include dependency graph for cpu.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


typedef void(* external_isr_ptr_t) (int intNum)
 External ISR callback.


void cpu_init (void)
 Initialization of the CPU.
void clock_init (void)
 Initialization of the clock.
uint32_t cpu_freq (void)
 Get and eventually compute the current CPU core clock frequency. More...
void irq_init (void)
 Initialization of interrupts.
void set_external_isr_cb (int intNum, external_isr_ptr_t cbFunc)
 Set External ISR callback.
static void cpu_print_last_instruction (void)
 Print the last instruction's address. More...
void nanostubs_init (void)
 Initialization of the Newlib-nano stub.