cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Ken Rabold
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
25 #ifndef CPU_H
26 #define CPU_H
27 
28 #include "thread.h"
29 #include "macros/units.h"
30 
31 #include "vendor/platform.h"
32 #include "vendor/plic_driver.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
41 void cpu_init(void);
42 
46 void clock_init(void);
47 
53 uint32_t cpu_freq(void);
54 
58 void irq_init(void);
59 
65 static inline void cpu_print_last_instruction(void)
66 {
67  /* This function must exist else RIOT won't compile */
68 }
69 
73 void nanostubs_init(void);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif /* CPU_H */
80 
cpu_freq
uint32_t cpu_freq(void)
Get and eventually compute the current CPU core clock frequency.
cpu_print_last_instruction
static void cpu_print_last_instruction(void)
Print the last instruction's address.
Definition: cpu.h:65
clock_init
void clock_init(void)
Initialization of the clock.
cpu_init
void cpu_init(void)
Initialization of the CPU.
nanostubs_init
void nanostubs_init(void)
Initialization of the Newlib-nano stub.
units.h
Unit helper macros.
irq_init
void irq_init(void)
Initialization of interrupts.