use config default as in chibios

This commit is contained in:
Nicolas Reinecke 2016-05-15 19:40:19 +02:00
parent aefe1f951b
commit c6f143e357
4 changed files with 44 additions and 17 deletions

View File

@ -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 */
/** @} */

View File

@ -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

View File

@ -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. */

View File

@ -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"