libyggdrasil  v1.0.0
yggdrasil.h
Go to the documentation of this file.
1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * _____.___. .___ .__.__ *
3  * \__ | | ____ ____ __| _/___________ _____|__| | *
4  * / | |/ ___\ / ___\ / __ |\_ __ \__ \ / ___/ | | *
5  * \____ / /_/ > /_/ > /_/ | | | \// __ \_\___ \| | |__ *
6  * / ______\___ /\___ /\____ | |__| (____ /____ >__|____/ *
7  * \/ /_____//_____/ \/ \/ \/ *
8  * - Yggdrasil - *
9  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
10  * This software can be used by students and other personal of the *
11  * Bern University of Applied Sciences under the terms of the MIT *
12  * license. *
13  * For other persons this software is under the terms of the GNU *
14  * General Public License version 2. *
15  * *
16  * Copyright © 2021, Bern University of Applied Sciences. *
17  * All rights reserved. *
18  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #pragma once
27 
28 #define ASGARD 1
29 #define MIDGARD 2
30 #define ASGARD_COPROC 3
31 
32 // C++ headers
33 #if defined(__cplusplus) && !defined(YGGDRASIL_USE_C_INTERFACE)
34 
35  #include <cpp/common/attributes.hpp>
36  #include <cpp/common/registers.hpp>
37  #include <cpp/common/types.hpp>
38  #include <cpp/common/utils.hpp>
39  #include <cpp/common/math.hpp>
40 
41  #if BOARD == ASGARD
42  #include <cpp/asgard/asgard.hpp>
43  #elif BOARD == ASGARD_COPROC
45  #elif BOARD == MIDGARD
46  #include <cpp/midgard/midgard.hpp>
47  #else
48  #error "No board selected. Choose one with '#define BOARD <BOARD_NAME>' before '#include <yggdrasil.h>'!"
49  #endif
50 
52 
53 // C headers
54 #else
55 
56  #include <c/common/attributes.h>
57  #include <c/common/types.h>
58 
59  #if BOARD == ASGARD
60  #include <c/asgard/asgard.h>
61  #elif BOARD == ASGARD_COPROC
62 
63  #elif BOARD == MIDGARD
64  #include <c/midgard/midgard.h>
65  #else
66  #error "No board selected. Choose one with 'BOARD = <BOARD_NAME>' define in the preprocessor settings!"
67  #endif
68 
69  #include <c/yggdrasil/yggdrasil.h>
70 
71 #endif
72 
73 // CMSIS DSP Library headers
74 #if defined(YGGDRASIL_USE_CMSIS_DSP)
75 
76  #include <c/cmsis/dsp/arm_common_tables.h>
77  #include <c/cmsis/dsp/arm_const_structs.h>
78  #include <c/cmsis/dsp/arm_helium_utils.h>
79  #include <c/cmsis/dsp/arm_math.h>
80  #include <c/cmsis/dsp/arm_mve_tables.h>
81  #include <c/cmsis/dsp/arm_sorting.h>
82  #include <c/cmsis/dsp/arm_vec_fft.h>
83  #include <c/cmsis/dsp/arm_vec_filtering.h>
84  #include <c/cmsis/dsp/arm_vec_math.h>
85 
86 #endif
87 
88 #if !defined(YGGDRASIL_PERIPHERAL_DEFS)
89  #warning "Standard peripheral definitions won't be added. Add them by adding the 'YGGDRASIL_PERIPHERAL_DEFS' define in the preprocessor settings!"
90 #endif
91 
92 #include <init.h>
yggdrasil.h
types.h
Commonly used type definitions and helper templates.
utils.hpp
Commonly used helper functions.
yggdrasil.hpp
Top-level include file for yggdrasil.
midgard.h
Top-level include file for Midgard.
types.hpp
Commonly used type definitions and helper templates.
asgard.h
Top-level include file for Asgard.
init.h
Initialization file for yggdrasil.
asgard.hpp
Top-level include file for Asgard.
midgard.hpp
Top-level include file for Midgard.
registers.hpp
Zero-cost abstraction for accessing registers and bits/bitfields within them.
attributes.h
Commonly used C and GNU attributes.
asgard_coproc.hpp
Top-level include file for Asgard Coprocessor.
attributes.hpp
Commonly used C++ and GNU attributes.
math.hpp
Commonly used math functions.