External module list depends on compilation options

- option PPM=NO is added for radios which don't support PPM anymore
- option SBUS=NO
- option DSM2=NO
This commit is contained in:
Bertrand Songis
2019-05-17 09:24:04 +02:00
parent c2e6985e3b
commit db23a2125d
4 changed files with 82 additions and 21 deletions
+32 -5
View File
@@ -7,9 +7,12 @@ option(TRACE_SD_CARD "Traces SD enabled" OFF)
option(TRACE_FATFS "Traces FatFS enabled" OFF)
option(TRACE_AUDIO "Traces audio enabled" OFF)
option(DEBUG_TRACE_BUFFER "Debug Trace Screen" OFF)
option(PPM "PPM TX Module" ON)
option(DSM2 "DSM2 TX Module" ON)
option(SBUS "SBUS TX Module" ON)
option(CROSSFIRE "Crossfire TX Module" OFF)
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" OFF)
option(MULTI_SPORT "SPORT telemetry support" OFF)
option(CROSSFIRE "Crossfire TX Module" OFF)
option(SUPPORT_D16_EU_ONLY "XJT module only supports D16-EU and LR12-EU" OFF) # TODO rename to XJT_EU_ONLY
option(DEBUG_INTERRUPTS "Count interrupts" OFF)
option(DEBUG_USB_INTERRUPTS "Count individual USB interrupts" OFF)
@@ -90,7 +93,13 @@ endif()
# Protocols supported
add_definitions(-DDSM2 -DSBUS)
if(DSM2)
add_definitions(-DDSM2)
endif()
if(SBUS)
add_definitions(-DSBUS)
endif()
if(PXX1)
add_definitions(-DPXX -DPXX1)
@@ -185,7 +194,25 @@ set(FIRMWARE_SRC
set(PULSES_SRC
${PULSES_SRC}
pulses.cpp
ppm.cpp
dsm2.cpp
sbus.cpp
)
if(PPM)
set(PULSES_SRC
${PULSES_SRC}
ppm.cpp
)
endif()
if(DSM2)
set(PULSES_SRC
${PULSES_SRC}
dsm2.cpp
)
endif()
if(SBUS)
set(PULSES_SRC
${PULSES_SRC}
sbus.cpp
)
endif()