feat: add U-BLOX GPS support (#4689)

This commit is contained in:
David PHAM-VAN
2024-04-08 08:36:45 +10:00
committed by GitHub
parent 9ed9227212
commit 4b8f80af3a
13 changed files with 1536 additions and 262 deletions
+16
View File
@@ -20,8 +20,20 @@ set(SIMU_DRIVERS
bt_driver.cpp
timers_driver.cpp
abnormal_reboot.cpp
rs232-linux.c
)
option(SIMU_AUX "Allow the simulator to use the host's RS-232 port" OFF)
set(SIMU_COM_PORT "2" CACHE STRING "Set COM port number to use")
if (SIMU_AUX)
if(WIN32)
set(SIMU_DRIVERS ${SIMU_DRIVERS} rs232-win.c)
else()
set(SIMU_DRIVERS ${SIMU_DRIVERS} rs232-linux.c)
endif()
endif()
set(HW_DESC_JSON ${FLAVOUR}.json)
AddHardwareDefTarget(${HW_DESC_JSON})
AddHWGenTarget(${HW_DESC_JSON} simu_keys simu_keys.inc)
@@ -70,6 +82,10 @@ target_compile_options(simu_drivers PRIVATE ${SIMU_SRC_OPTIONS})
set_property(TARGET simu_drivers PROPERTY POSITION_INDEPENDENT_CODE ON)
if(SIMU_AUX)
target_compile_definitions(simu_drivers PRIVATE -DSIMU_COM_PORT=${SIMU_COM_PORT})
endif()
# Replace SIMU_SRC with the objects from radiolib_native & simu_drivers
set(SIMU_SRC
$<TARGET_OBJECTS:radiolib_native>