diff options
author | Nicolas Reinecke <nr@das-labor.org> | 2016-05-15 19:40:19 +0200 |
---|---|---|
committer | Nicolas Reinecke <nr@das-labor.org> | 2016-05-17 00:41:50 +0200 |
commit | c6f143e357a5897480b0821c7c578ec2245ec985 (patch) | |
tree | 569b5c024381fc82d77600271d5abb695ce5d02f | |
parent | aefe1f951b166e3e6043c6126ddcb42299eae4e7 (diff) | |
download | ChibiOS-Contrib-c6f143e357a5897480b0821c7c578ec2245ec985.tar.gz ChibiOS-Contrib-c6f143e357a5897480b0821c7c578ec2245ec985.tar.bz2 ChibiOS-Contrib-c6f143e357a5897480b0821c7c578ec2245ec985.zip |
use config default as in chibios
-rw-r--r-- | os/hal/include/hal_community.h | 44 | ||||
-rw-r--r-- | os/hal/include/hal_eeprom.h | 6 | ||||
-rw-r--r-- | os/hal/include/hal_timcap.h | 6 | ||||
-rw-r--r-- | os/hal/include/hal_usbh.h | 5 |
4 files changed, 44 insertions, 17 deletions
diff --git a/os/hal/include/hal_community.h b/os/hal/include/hal_community.h index 3d8ac16..75b3916 100644 --- a/os/hal/include/hal_community.h +++ b/os/hal/include/hal_community.h @@ -22,8 +22,46 @@ * @{
*/
-#ifndef _HAL_COMMUNITY_H_
-#define _HAL_COMMUNITY_H_
+#ifndef HAL_COMMUNITY_H
+#define HAL_COMMUNITY_H
+
+
+/* Error checks on the configuration header file.*/
+#if !defined(HAL_USE_CRC)
+#define HAL_USE_CRC FALSE
+#endif
+
+#if !defined(HAL_USE_EEPROM)
+#define HAL_USE_EEPROM FALSE
+#endif
+
+#if !defined(HAL_USE_EICU)
+#define HAL_USE_EICU FALSE
+#endif
+
+#if !defined(HAL_USE_NAND)
+#define HAL_USE_NAND FALSE
+#endif
+
+#if !defined(HAL_USE_ONEWIRE)
+#define HAL_USE_ONEWIRE FALSE
+#endif
+
+#if !defined(HAL_USE_QEI)
+#define HAL_USE_QEI FALSE
+#endif
+
+#if !defined(HAL_USE_RNG)
+#define HAL_USE_RNG FALSE
+#endif
+
+#if !defined(HAL_USE_TIMCAP)
+#define HAL_USE_TIMCAP FALSE
+#endif
+
+#if !defined(HAL_USE_USBH)
+#define HAL_USE_USBH FALSE
+#endif
/* Abstract interfaces.*/
@@ -74,6 +112,6 @@ extern "C" { }
#endif
-#endif /* _HAL_COMMUNITY_H_ */
+#endif /* HAL_COMMUNITY_H */
/** @} */
diff --git a/os/hal/include/hal_eeprom.h b/os/hal/include/hal_eeprom.h index c3ac3c6..cd05e14 100644 --- a/os/hal/include/hal_eeprom.h +++ b/os/hal/include/hal_eeprom.h @@ -32,10 +32,6 @@ #include "ch.h" #include "hal.h" -#ifndef HAL_USE_EEPROM -#define HAL_USE_EEPROM FALSE -#endif - #ifndef EEPROM_USE_EE25XX #define EEPROM_USE_EE25XX FALSE #endif @@ -44,7 +40,7 @@ #define EEPROM_USE_EE24XX FALSE #endif -#if HAL_USE_EEPROM +#if (HAL_USE_EEPROM == TRUE) || defined(__DOXYGEN__) #if EEPROM_USE_EE25XX && EEPROM_USE_EE24XX #define EEPROM_TABLE_SIZE 2 diff --git a/os/hal/include/hal_timcap.h b/os/hal/include/hal_timcap.h index 9629564..bd43dd1 100644 --- a/os/hal/include/hal_timcap.h +++ b/os/hal/include/hal_timcap.h @@ -32,11 +32,7 @@ #include "ch.h" #include "hal.h" -#ifndef HAL_USE_TIMCAP -#define HAL_USE_TIMCAP FALSE -#endif - -#if HAL_USE_TIMCAP || defined(__DOXYGEN__) +#if (HAL_USE_TIMCAP == TRUE) || defined(__DOXYGEN__) /*===========================================================================*/ /* Driver constants. */ diff --git a/os/hal/include/hal_usbh.h b/os/hal/include/hal_usbh.h index 8029be8..5fd0047 100644 --- a/os/hal/include/hal_usbh.h +++ b/os/hal/include/hal_usbh.h @@ -20,9 +20,6 @@ #include "hal.h" -#ifndef HAL_USE_USBH -#define HAL_USE_USBH FALSE -#endif #ifndef HAL_USBH_USE_FTDI #define HAL_USBH_USE_FTDI FALSE @@ -40,7 +37,7 @@ #define HAL_USBH_USE_UVC FALSE #endif -#if HAL_USE_USBH +#if (HAL_USE_USBH == TRUE) || defined(__DOXYGEN__) #include "osal.h" #include "usbh/list.h" |