Skip to content

Commit

Permalink
Merge pull request ChibiOS#75 from pl4nkton/hal_default_config
Browse files Browse the repository at this point in the history
use config default as in chibios
  • Loading branch information
barthess committed May 17, 2016
2 parents aefe1f9 + c6f143e commit e1311c4
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 17 deletions.
44 changes: 41 additions & 3 deletions os/hal/include/hal_community.h
Expand Up @@ -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.*/

Expand Down Expand Up @@ -74,6 +112,6 @@ extern "C" {
}
#endif

#endif /* _HAL_COMMUNITY_H_ */
#endif /* HAL_COMMUNITY_H */

/** @} */
6 changes: 1 addition & 5 deletions os/hal/include/hal_eeprom.h
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 1 addition & 5 deletions os/hal/include/hal_timcap.h
Expand Up @@ -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. */
Expand Down
5 changes: 1 addition & 4 deletions os/hal/include/hal_usbh.h
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit e1311c4

Please sign in to comment.