Commit 0ab4fa85 authored by Thomas Schöpping's avatar Thomas Schöpping
Browse files

Preprocessor directives aligned

parent e9eca455
......@@ -62,60 +62,60 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <alldconf.h>
#if !defined(_AMIRO_LLD_CFG_)
#error "invalid AMiRo-LLD configuration file"
#elif (AMIRO_LLD_CFG_VERSION_MAJOR != AMIROLLD_VERSION_MAJOR) || (AMIRO_LLD_CFG_VERSION_MINOR < AMIROLLD_VERSION_MINOR)
#error "incompatible AMiRo-LLD configuration file"
#endif
#if !defined(AMIROLLD_CFG_TIME_SIZE)
#error "AMIROLLD_CFG_TIME_SIZE not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_TIME_SIZE) */
#if !defined(AMIROLLD_CFG_DBG)
#error "AMIROLLD_CFG_DBG not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_DBG) */
#if !defined(AMIROLLD_CFG_GPIO)
#error "AMIROLLD_CFG_GPIO not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_GPIO) */
#if !defined(AMIROLLD_CFG_PWM)
#error "AMIROLLD_CFG_PWM not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_PWM) */
#if !defined(AMIROLLD_CFG_QEI)
#error "AMIROLLD_CFG_QEI not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_QEI) */
#if !defined(AMIROLLD_CFG_I2C)
#error "AMIROLLD_CFG_I2C not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_I2C) */
#if !defined(AMIROLLD_CFG_SPI)
#error "AMIROLLD_CFG_SPI not defined in alldconf.h"
#endif /* !defined(AMIROLLD_CFG_SPI) */
#if ((AMIROLLD_CFG_GPIO == true) || \
(AMIROLLD_CFG_PWM == true) || \
(AMIROLLD_CFG_QEI == true) || \
(AMIROLLD_CFG_I2C == true) || \
(AMIROLLD_CFG_SPI == true)) && \
!defined(AMIROLLD_CFG_PERIPHAL_HEADER)
#error "AMIROLLD_CFG_PERIPHAL_HEADER required but not defined in alldconf.h"
#endif
# if !defined(_AMIRO_LLD_CFG_)
# error "invalid AMiRo-LLD configuration file"
# elif (AMIRO_LLD_CFG_VERSION_MAJOR != AMIROLLD_VERSION_MAJOR) || (AMIRO_LLD_CFG_VERSION_MINOR < AMIROLLD_VERSION_MINOR)
# error "incompatible AMiRo-LLD configuration file"
# endif
# if !defined(AMIROLLD_CFG_TIME_SIZE)
# error "AMIROLLD_CFG_TIME_SIZE not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_TIME_SIZE) */
# if !defined(AMIROLLD_CFG_DBG)
# error "AMIROLLD_CFG_DBG not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_DBG) */
# if !defined(AMIROLLD_CFG_GPIO)
# error "AMIROLLD_CFG_GPIO not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_GPIO) */
# if !defined(AMIROLLD_CFG_PWM)
# error "AMIROLLD_CFG_PWM not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_PWM) */
# if !defined(AMIROLLD_CFG_QEI)
# error "AMIROLLD_CFG_QEI not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_QEI) */
# if !defined(AMIROLLD_CFG_I2C)
# error "AMIROLLD_CFG_I2C not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_I2C) */
# if !defined(AMIROLLD_CFG_SPI)
# error "AMIROLLD_CFG_SPI not defined in alldconf.h"
# endif /* !defined(AMIROLLD_CFG_SPI) */
# if ((AMIROLLD_CFG_GPIO == true) || \
(AMIROLLD_CFG_PWM == true) || \
(AMIROLLD_CFG_QEI == true) || \
(AMIROLLD_CFG_I2C == true) || \
(AMIROLLD_CFG_SPI == true)) && \
!defined(AMIROLLD_CFG_PERIPHAL_HEADER)
# error "AMIROLLD_CFG_PERIPHAL_HEADER required but not defined in alldconf.h"
# endif
/******************************************************************************/
/* PERIPHERY ABSTRACTION LAYER (periphAL) */
/******************************************************************************/
#if defined(AMIROLLD_CFG_PERIPHAL_HEADER)
#define __include(file) <file>
#define _include(file) __include(file)
#include _include(AMIROLLD_CFG_PERIPHAL_HEADER)
#undef _include
#undef __include
#endif
# if defined(AMIROLLD_CFG_PERIPHAL_HEADER)
# define __include(file) <file>
# define _include(file) __include(file)
# include _include(AMIROLLD_CFG_PERIPHAL_HEADER)
# undef _include
# undef __include
# endif
#include <periphAL.h>
......
......@@ -41,23 +41,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* CHECKS */
/******************************************************************************/
#ifndef PKxxxExxx_LLD_FREQUENCY_SPEC
#error "PKxxxExxx_LLD_FREQUENCY_SPEC not defined"
#elif !(PKxxxExxx_LLD_FREQUENCY_SPEC > 0)
#error "PKxxxExxx_LLD_FREQUENCY_SPEC set to invalid value"
#endif
#ifndef PKxxxExxx_LLD_FREQUENCY_MIN
#warning "PKxxxExxx_LLD_FREQUENCY_MIN not defined (recommended)"
#elif !(PKxxxExxx_LLD_FREQUENCY_MIN > 0)
#error "PKxxxExxx_LLD_FREQUENCY_MIN set to invalid value"
#endif
#ifndef PKxxxExxx_LLD_FREQUENCY_MAX
#warning "PKxxxExxx_LLD_FREQUENCY_MAX not defined (recommended)"
#elif !(PKxxxExxx_LLD_FREQUENCY_MAX > 0)
#error "PKxxxExxx_LLD_FREQUENCY_MAX set to invalid value"
#endif
# ifndef PKxxxExxx_LLD_FREQUENCY_SPEC
# error "PKxxxExxx_LLD_FREQUENCY_SPEC not defined"
# elif !(PKxxxExxx_LLD_FREQUENCY_SPEC > 0)
# error "PKxxxExxx_LLD_FREQUENCY_SPEC set to invalid value"
# endif
# ifndef PKxxxExxx_LLD_FREQUENCY_MIN
# warning "PKxxxExxx_LLD_FREQUENCY_MIN not defined (recommended)"
# elif !(PKxxxExxx_LLD_FREQUENCY_MIN > 0)
# error "PKxxxExxx_LLD_FREQUENCY_MIN set to invalid value"
# endif
# ifndef PKxxxExxx_LLD_FREQUENCY_MAX
# warning "PKxxxExxx_LLD_FREQUENCY_MAX not defined (recommended)"
# elif !(PKxxxExxx_LLD_FREQUENCY_MAX > 0)
# error "PKxxxExxx_LLD_FREQUENCY_MAX set to invalid value"
# endif
/******************************************************************************/
/* DATA STRUCTURES AND TYPES */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment