GR712RC unit tests 1.0
Bare-metal C++ hardware tests for the PLATO DPU (IAA-CSIC, 2019)
Loading...
Searching...
No Matches
mcal_cpu.h
Go to the documentation of this file.
1
9
10#ifndef _MCAL_CPU_SAM4S_EMBEDDED_2018_
11#define _MCAL_CPU_SAM4S_EMBEDDED_2018_
12
13#include <cstdint>
14
15namespace mcal
16{
17namespace cpu
18{
19
20typedef void config_type;
21
22void init(config_type *);
23
24inline void nop() { asm volatile("nop"); }
25
26//There are four types of flush, may we should implement all.
27// Verify this functions in the asm.
28inline void flush() { asm volatile("flush"); }
29
30//Necesita un template y una fordware declaration.
31inline std::uint32_t read_program_memory(volatile std::uint32_t * pointer_to_program_memory)
32{
33 return *pointer_to_program_memory;
34}
35
36
37}
38}
39
40#endif //_MCAL_CPU_SAM4S_EMBEDDED_2018
void config_type
Definition mcal_cpu.h:20
void init(config_type *)
Definition mcal_cpu.cpp:16
std::uint32_t read_program_memory(volatile std::uint32_t *pointer_to_program_memory)
Definition mcal_cpu.h:31
void nop()
Definition mcal_cpu.h:24
void flush()
Definition mcal_cpu.h:28