1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

usart: make USART ports configurable from make command line

For CopterControl the following make options are available:

USE_TELEMETRY=[YES|NO|1|3]    (default is YES, USART1)
USE_GPS=[YES|NO|1|3]          (default is NO, USART3)
USE_SPEKTRUM=[YES|NO|1|3]     (default is NO, USART3)
USE_SBUS=[YES|NO|1]           (default is NO, USART1 only)
This commit is contained in:
Oleg Semyonov 2011-06-18 23:54:32 +03:00
parent 311902f1f2
commit 59da5055cd

View File

@ -382,18 +382,39 @@ endif
ifeq ($(ERASE_FLASH), YES) ifeq ($(ERASE_FLASH), YES)
CDEFS += -DERASE_FLASH CDEFS += -DERASE_FLASH
endif endif
ifneq ($(USE_TELEMETRY), NO)
ifeq ($(USE_TELEMETRY), YES) ifeq ($(USE_TELEMETRY), YES)
CDEFS += -DUSE_TELEMETRY CDEFS += -DUSE_TELEMETRY
else
CDEFS += -DUSE_TELEMETRY -DPIOS_PORT_TELEMETRY=$(USE_TELEMETRY)
endif endif
endif
ifneq ($(USE_GPS), NO)
ifeq ($(USE_GPS), YES) ifeq ($(USE_GPS), YES)
CDEFS += -DUSE_GPS CDEFS += -DUSE_GPS
else
CDEFS += -DUSE_GPS -DPIOS_PORT_GPS=$(USE_GPS)
endif endif
endif
ifneq ($(USE_SPEKTRUM), NO)
ifeq ($(USE_SPEKTRUM), YES) ifeq ($(USE_SPEKTRUM), YES)
CDEFS += -DUSE_SPEKTRUM CDEFS += -DUSE_SPEKTRUM
else
CDEFS += -DUSE_SPEKTRUM -DPIOS_PORT_SPEKTRUM=$(USE_SPEKTRUM)
endif endif
endif
ifneq ($(USE_SBUS), NO)
ifeq ($(USE_SBUS), YES) ifeq ($(USE_SBUS), YES)
CDEFS += -DUSE_SBUS CDEFS += -DUSE_SBUS
else
CDEFS += -DUSE_SBUS -DPIOS_PORT_SBUS=$(USE_SBUS)
endif endif
endif
ifeq ($(USE_I2C), YES) ifeq ($(USE_I2C), YES)
CDEFS += -DUSE_I2C CDEFS += -DUSE_I2C
endif endif