chore(cpn): Allow configuring AUX serial port as "External module" (#2854)

* Add external module to hardware settings

* Use serial port aux1 rather than radio profile externalaccessmod
Move module conversion function from OpenTxFirmare to ModuleData

* Remove externalaccessmod from radio profile options

* Unnecessary CMake option HARDWARE_EXTERNAL_ACCESS_MOD removed.

---------

Co-authored-by: rotorman <risto.koiva@web.de>
This commit is contained in:
Neil Horne
2023-03-05 19:12:32 +10:00
committed by GitHub
co-authored by rotorman
parent b4e13474df
commit c84abbf739
11 changed files with 186 additions and 157 deletions
-3
View File
@@ -95,9 +95,6 @@ static const char * const options[] = {
#if defined(SHUTDOWN_CONFIRMATION)
"shutdownconfirm",
#endif
#if defined(HARDWARE_EXTERNAL_ACCESS_MOD)
"externalaccessmod",
#endif
#if defined(IMU_LSM6DS33)
"lsm6ds33",
#endif
-7
View File
@@ -6,7 +6,6 @@ option(PXX2 "PXX2 protocol support" OFF)
option(AFHDS3 "AFHDS3 TX Module" ON)
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
option(GHOST "Ghost TX Module" ON)
option(HARDWARE_EXTERNAL_ACCESS_MOD "Support for R9M 2019 hardware mod" OFF)
option(SPACEMOUSE "Support for SpaceMouse" OFF)
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
@@ -189,12 +188,6 @@ if(NOT UNEXPECTED_SHUTDOWN)
add_definitions(-DNO_UNEXPECTED_SHUTDOWN)
endif()
if(HARDWARE_EXTERNAL_ACCESS_MOD)
set(PXX2 ON)
set(AUX_SERIAL OFF)
add_definitions(-DHARDWARE_EXTERNAL_ACCESS_MOD)
endif()
if(IMU_LSM6DS33)
add_definitions(-DIMU_LSM6DS33)
set(AUX_SERIAL OFF)
+1 -1
View File
@@ -849,7 +849,7 @@
#define EXTMODULE_PWR_GPIO GPIOB
#define EXTMODULE_PWR_GPIO_PIN GPIO_Pin_3 // PB.03
#define EXTERNAL_MODULE_PWR_OFF() GPIO_ResetBits(EXTMODULE_PWR_GPIO, EXTMODULE_PWR_GPIO_PIN)
#if (defined(PCBX10) && defined(PCBREV_EXPRESS)) || defined(HARDWARE_EXTERNAL_ACCESS_MOD)
#if defined(PCBX10) && defined(PCBREV_EXPRESS)
#define EXTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA1)
#define EXTMODULE_TX_GPIO GPIOB
#define EXTMODULE_USART_GPIO EXTMODULE_TX_GPIO