Statistics
| Branch: | Tag: | Revision:

amiro-lld / amiro-lld.h @ master

History | View | Annotate | Download (3.86 KB)

1 d6728c5b Thomas Schöpping
/*
2
AMiRo-LLD is a compilation of low-level hardware drivers for the Autonomous Mini Robot (AMiRo) platform.
3 f69ec051 Thomas Schöpping
Copyright (C) 2016..2020  Thomas Schöpping et al.
4 d6728c5b Thomas Schöpping

5
This program is free software: you can redistribute it and/or modify
6 f0ca400f Thomas Schöpping
it under the terms of the GNU Lesser General Public License as published by
7 d6728c5b Thomas Schöpping
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 f0ca400f Thomas Schöpping
GNU Lesser General Public License for more details.
14 d6728c5b Thomas Schöpping

15 f0ca400f Thomas Schöpping
You should have received a copy of the GNU Lesser General Public License
16 d6728c5b Thomas Schöpping
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19 8c47f14b Thomas Schöpping
#ifndef AMIROLLD_H
20
#define AMIROLLD_H
21 d6728c5b Thomas Schöpping
22
/**
23
 * @brief   AMIRO-LLD identification macro.
24
 */
25
#define _AMIRO_LLD_
26
27 1304b12b Thomas Schöpping
/*===========================================================================*/
28 d6728c5b Thomas Schöpping
/**
29
 * @name   AMiRo-LLD version and relase information.
30
 * @{
31
 */
32 1304b12b Thomas Schöpping
/*===========================================================================*/
33 d6728c5b Thomas Schöpping
34
/**
35
 * @brief   Realease type of this version.
36 3fb3c6e7 Thomas Schöpping
 * @note    Possible values are "pre-alpha", "alpha", "beta", "release candidate", and "release".
37 d6728c5b Thomas Schöpping
 */
38 1304b12b Thomas Schöpping
#define AMIROLLD_RELEASE_TYPE                   "beta"
39 d6728c5b Thomas Schöpping
40
/**
41 3fb3c6e7 Thomas Schöpping
 * @brief   The AMiRo-LLD major version.
42 d6728c5b Thomas Schöpping
 * @note    Changes of the major version imply incompatibilities.
43
 */
44 1304b12b Thomas Schöpping
#define AMIROLLD_VERSION_MAJOR                  1
45 d6728c5b Thomas Schöpping
46
/**
47 3fb3c6e7 Thomas Schöpping
 * @brief   The AMiRo-LLD minor version.
48 d6728c5b Thomas Schöpping
 * @note    A higher minor version implies new functionalty, but all old interfaces are still available.
49
 */
50 1304b12b Thomas Schöpping
#define AMIROLLD_VERSION_MINOR                  1
51 d6728c5b Thomas Schöpping
52
/**
53 3fb3c6e7 Thomas Schöpping
 * @brief   The AMiRo-LLD patch level.
54 d6728c5b Thomas Schöpping
 */
55 1304b12b Thomas Schöpping
#define AMIROLLD_VERSION_PATCH                  0
56 d6728c5b Thomas Schöpping
57
/** @} */
58
59 1304b12b Thomas Schöpping
/******************************************************************************/
60
/* CONFIGURATION & VERIFICATION                                               */
61
/******************************************************************************/
62
63 d6728c5b Thomas Schöpping
#include <alldconf.h>
64 1304b12b Thomas Schöpping
65 d6728c5b Thomas Schöpping
#if !defined(_AMIRO_LLD_CFG_)
66 1304b12b Thomas Schöpping
  #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 d6728c5b Thomas Schöpping
#endif
70
71 1304b12b Thomas Schöpping
#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 d6728c5b Thomas Schöpping
#endif
107
108 1304b12b Thomas Schöpping
/******************************************************************************/
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 8c47f14b Thomas Schöpping
#endif /* AMIROLLD_H */