1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

CC/Makefile - Make I2C conditional compilation, disabled by default. Unterminated I2C can cause boot process to hang. Thus disabling I2C by default should help to avoid problems in the future.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@3059 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
chebuzz 2011-03-21 09:18:21 +00:00 committed by chebuzz
parent 32430a3b15
commit 183ca03cc9
2 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,7 @@ USE_BOOTLOADER ?= NO
USE_SPEKTRUM ?= NO
USE_I2C ?= NO
# Set to YES when using Code Sourcery toolchain
CODE_SOURCERY ?= YES
@ -392,6 +393,10 @@ ifeq ($(USE_SPEKTRUM), YES)
CDEFS += -DUSE_SPEKTRUM
endif
ifeq ($(USE_I2C), YES)
CDEFS += -DUSE_I2C
endif
# Place project-specific -D and/or -U options for
# Assembler with preprocessor here.

View File

@ -38,7 +38,10 @@
/* Enable/Disable PiOS Modules */
#define PIOS_INCLUDE_ADC
#define PIOS_INCLUDE_DELAY
#if defined(USE_I2C)
#define PIOS_INCLUDE_I2C
#define PIOS_INCLUDE_I2C_ESC
#endif
#define PIOS_INCLUDE_IRQ
#define PIOS_INCLUDE_LED
@ -62,7 +65,6 @@
#define PIOS_INCLUDE_GPIO
#define PIOS_INCLUDE_EXTI
#define PIOS_INCLUDE_WDG
#define PIOS_INCLUDE_I2C_ESC
#define PIOS_INCLUDE_ADXL345
#define PIOS_INCLUDE_FLASH