[Kconfig] Move UAVCANv0 num interfaces to Kconfig

This commit is contained in:
Peter van der Perk
2021-10-07 10:09:01 -04:00
committed by Daniel Agar
parent 16f86a99c2
commit a0821afafd
5 changed files with 22 additions and 1 deletions
+12
View File
@@ -151,5 +151,17 @@ if(EXISTS ${BOARD_DEFCONFIG})
list(APPEND config_module_list examples/${example})
endif()
# Find variable name
string(REGEX MATCH "^CONFIG_UAVCAN_INTERFACES" UAVCAN_INTERFACES ${NameAndValue})
# Temporary located here to maintain binary compatibility, have to be removed later
if(UAVCAN_INTERFACES)
# Find the value
string(REPLACE "${Name}=" "" Value ${NameAndValue})
set(config_uavcan_num_ifaces ${Value} CACHE INTERNAL "UAVCAN interfaces" FORCE)
endif()
endforeach()
endif()