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 
30 #include "vendor/platform.h"
31 #include "vendor/plic_driver.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
40 void cpu_init(void);
41 
45 void clock_init(void);
46 
52 uint32_t cpu_freq(void);
53 
57 void irq_init(void);
58 
62 typedef void (*external_isr_ptr_t)(int intNum);
63 
67 void set_external_isr_cb(int intNum, external_isr_ptr_t cbFunc);
68 
74 static inline void cpu_print_last_instruction(void)
75 {
76  /* This function must exist else RIOT won't compile */
77 }
78 
82 void nanostubs_init(void);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif /* CPU_H */
89 
void cpu_init(void)
Initialization of the CPU.
void nanostubs_init(void)
Initialization of the Newlib-nano stub.
void clock_init(void)
Initialization of the clock.
static void cpu_print_last_instruction(void)
Print the last instruction's address.
Definition: cpu.h:74
uint32_t cpu_freq(void)
Get and eventually compute the current CPU core clock frequency.
void set_external_isr_cb(int intNum, external_isr_ptr_t cbFunc)
Set External ISR callback.
void irq_init(void)
Initialization of interrupts.
void(* external_isr_ptr_t)(int intNum)
External ISR callback.
Definition: cpu.h:62