amiro-lld / amiro-lld.h @ ed9a1bf5
History | View | Annotate | Download (3.857 KB)
1 |
/*
|
---|---|
2 |
AMiRo-LLD is a compilation of low-level hardware drivers for the Autonomous Mini Robot (AMiRo) platform.
|
3 |
Copyright (C) 2016..2020 Thomas Schöpping et al.
|
4 |
|
5 |
This program is free software: you can redistribute it and/or modify
|
6 |
it under the terms of the GNU Lesser General Public License as published by
|
7 |
the Free Software Foundation, either version 3 of the License, or
|
8 |
(at your option) any later version.
|
9 |
|
10 |
This program is distributed in the hope that it will be useful,
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
GNU Lesser General Public License for more details.
|
14 |
|
15 |
You should have received a copy of the GNU Lesser General Public License
|
16 |
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
*/
|
18 |
|
19 |
#ifndef AMIROLLD_H
|
20 |
#define AMIROLLD_H
|
21 |
|
22 |
/**
|
23 |
* @brief AMIRO-LLD identification macro.
|
24 |
*/
|
25 |
#define _AMIRO_LLD_
|
26 |
|
27 |
/*===========================================================================*/
|
28 |
/**
|
29 |
* @name AMiRo-LLD version and relase information.
|
30 |
* @{
|
31 |
*/
|
32 |
/*===========================================================================*/
|
33 |
|
34 |
/**
|
35 |
* @brief Realease type of this version.
|
36 |
* @note Possible values are "pre-alpha", "alpha", "beta", "release candidate", and "release".
|
37 |
*/
|
38 |
#define AMIROLLD_RELEASE_TYPE "beta" |
39 |
|
40 |
/**
|
41 |
* @brief The AMiRo-LLD major version.
|
42 |
* @note Changes of the major version imply incompatibilities.
|
43 |
*/
|
44 |
#define AMIROLLD_VERSION_MAJOR 1 |
45 |
|
46 |
/**
|
47 |
* @brief The AMiRo-LLD minor version.
|
48 |
* @note A higher minor version implies new functionalty, but all old interfaces are still available.
|
49 |
*/
|
50 |
#define AMIROLLD_VERSION_MINOR 1 |
51 |
|
52 |
/**
|
53 |
* @brief The AMiRo-LLD patch level.
|
54 |
*/
|
55 |
#define AMIROLLD_VERSION_PATCH 0 |
56 |
|
57 |
/** @} */
|
58 |
|
59 |
/******************************************************************************/
|
60 |
/* CONFIGURATION & VERIFICATION */
|
61 |
/******************************************************************************/
|
62 |
|
63 |
#include <alldconf.h> |
64 |
|
65 |
#if !defined(_AMIRO_LLD_CFG_)
|
66 |
#error "invalid AMiRo-LLD configuration file" |
67 |
#elif (AMIRO_LLD_CFG_VERSION_MAJOR != AMIROLLD_VERSION_MAJOR) || (AMIRO_LLD_CFG_VERSION_MINOR < AMIROLLD_VERSION_MINOR)
|
68 |
#error "incompatible AMiRo-LLD configuration file" |
69 |
#endif
|
70 |
|
71 |
#if !defined(AMIROLLD_CFG_TIME_SIZE)
|
72 |
#error "AMIROLLD_CFG_TIME_SIZE not defined in alldconf.h" |
73 |
#endif /* !defined(AMIROLLD_CFG_TIME_SIZE) */ |
74 |
|
75 |
#if !defined(AMIROLLD_CFG_DBG)
|
76 |
#error "AMIROLLD_CFG_DBG not defined in alldconf.h" |
77 |
#endif /* !defined(AMIROLLD_CFG_DBG) */ |
78 |
|
79 |
#if !defined(AMIROLLD_CFG_GPIO)
|
80 |
#error "AMIROLLD_CFG_GPIO not defined in alldconf.h" |
81 |
#endif /* !defined(AMIROLLD_CFG_GPIO) */ |
82 |
|
83 |
#if !defined(AMIROLLD_CFG_PWM)
|
84 |
#error "AMIROLLD_CFG_PWM not defined in alldconf.h" |
85 |
#endif /* !defined(AMIROLLD_CFG_PWM) */ |
86 |
|
87 |
#if !defined(AMIROLLD_CFG_QEI)
|
88 |
#error "AMIROLLD_CFG_QEI not defined in alldconf.h" |
89 |
#endif /* !defined(AMIROLLD_CFG_QEI) */ |
90 |
|
91 |
#if !defined(AMIROLLD_CFG_I2C)
|
92 |
#error "AMIROLLD_CFG_I2C not defined in alldconf.h" |
93 |
#endif /* !defined(AMIROLLD_CFG_I2C) */ |
94 |
|
95 |
#if !defined(AMIROLLD_CFG_SPI)
|
96 |
#error "AMIROLLD_CFG_SPI not defined in alldconf.h" |
97 |
#endif /* !defined(AMIROLLD_CFG_SPI) */ |
98 |
|
99 |
#if ((AMIROLLD_CFG_GPIO == true) || \ |
100 |
(AMIROLLD_CFG_PWM == true) || \
|
101 |
(AMIROLLD_CFG_QEI == true) || \
|
102 |
(AMIROLLD_CFG_I2C == true) || \
|
103 |
(AMIROLLD_CFG_SPI == true)) && \
|
104 |
!defined(AMIROLLD_CFG_PERIPHAL_HEADER) |
105 |
#error "AMIROLLD_CFG_PERIPHAL_HEADER required but not defined in alldconf.h" |
106 |
#endif
|
107 |
|
108 |
/******************************************************************************/
|
109 |
/* PERIPHERY ABSTRACTION LAYER (periphAL) */
|
110 |
/******************************************************************************/
|
111 |
|
112 |
#if defined(AMIROLLD_CFG_PERIPHAL_HEADER)
|
113 |
#include AMIROLLD_CFG_PERIPHAL_HEADER
|
114 |
#endif
|
115 |
|
116 |
#include <periphAL.h> |
117 |
|
118 |
#endif /* AMIROLLD_H */ |