Asym ghost support (#7910)
This commit is contained in:
@@ -14,7 +14,6 @@ option(PPM "PPM TX Module" ON)
|
||||
option(DSM2 "DSM2 TX Module" ON)
|
||||
option(SBUS "SBUS TX Module" ON)
|
||||
option(CROSSFIRE "Crossfire TX Module" ON)
|
||||
option(GHOST "Ghost TX Module" ON)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
|
||||
option(DEBUG_INTERRUPTS "Count interrupts" OFF)
|
||||
option(DEBUG_LATENCY "Debug latency" OFF)
|
||||
|
||||
@@ -4,6 +4,7 @@ option(PXX1 "PXX1 protocol support" ON)
|
||||
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)
|
||||
|
||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||
set(CPU_TYPE STM32F4)
|
||||
|
||||
@@ -240,6 +240,11 @@ void telemetryPortInvertedRxBit()
|
||||
|
||||
void telemetryPortSetDirectionOutput()
|
||||
{
|
||||
#if defined(GHOST) && SPORT_MAX_BAUDRATE < 400000
|
||||
if (isModuleGhost(EXTERNAL_MODULE)) {
|
||||
TELEMETRY_USART->BRR = BRR_400K;
|
||||
}
|
||||
#endif
|
||||
TELEMETRY_DIR_GPIO->BSRRL = TELEMETRY_DIR_GPIO_PIN; // output enable
|
||||
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
|
||||
}
|
||||
@@ -252,6 +257,11 @@ void sportWaitTransmissionComplete()
|
||||
void telemetryPortSetDirectionInput()
|
||||
{
|
||||
sportWaitTransmissionComplete();
|
||||
#if defined(GHOST) && SPORT_MAX_BAUDRATE < 400000
|
||||
if (isModuleGhost(EXTERNAL_MODULE) && g_eeGeneral.telemetryBaudrate == GHST_TELEMETRY_RATE_115K) {
|
||||
TELEMETRY_USART->BRR = BRR_115K;
|
||||
}
|
||||
#endif
|
||||
TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN; // output disable
|
||||
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ set(RADIO_DEPENDENCIES ${RADIO_DEPENDENCIES} 9x_bitmaps)
|
||||
set(PPM_LIMITS_SYMETRICAL YES)
|
||||
set(PXX1 YES)
|
||||
set(AFHDS3 NO)
|
||||
set(GHOST NO)
|
||||
add_definitions(-DDISABLE_MULTI_UPDATE)
|
||||
|
||||
if(PCB STREQUAL 9XRPRO)
|
||||
|
||||
@@ -3,6 +3,7 @@ option(LCD_DUAL_BUFFER "Dual LCD Buffer" OFF)
|
||||
option(PXX1 "PXX1 protocol support" ON)
|
||||
option(PXX2 "PXX2 protocol support" OFF)
|
||||
option(AFHDS3 "AFHDS3 TX Module" OFF)
|
||||
option(GHOST "Ghost TX Module" ON)
|
||||
option(INTERNAL_MODULE_PPM "Support for PPM internal module" OFF)
|
||||
option(AUTOUPDATE "Auto update internal chips from SD" OFF)
|
||||
|
||||
|
||||
@@ -203,6 +203,11 @@ void telemetryPortInvertedRxBit()
|
||||
|
||||
void telemetryPortSetDirectionOutput()
|
||||
{
|
||||
#if defined(GHOST) && SPORT_MAX_BAUDRATE < 400000
|
||||
if (isModuleGhost(EXTERNAL_MODULE)) {
|
||||
TELEMETRY_USART->BRR = BRR_400K;
|
||||
}
|
||||
#endif
|
||||
TELEMETRY_DIR_OUTPUT();
|
||||
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
|
||||
}
|
||||
@@ -215,6 +220,11 @@ void sportWaitTransmissionComplete()
|
||||
void telemetryPortSetDirectionInput()
|
||||
{
|
||||
sportWaitTransmissionComplete();
|
||||
#if defined(GHOST) && SPORT_MAX_BAUDRATE < 400000
|
||||
if (isModuleGhost(EXTERNAL_MODULE) && g_eeGeneral.telemetryBaudrate == GHST_TELEMETRY_RATE_115K) {
|
||||
TELEMETRY_USART->BRR = BRR_115K;
|
||||
}
|
||||
#endif
|
||||
TELEMETRY_DIR_INPUT();
|
||||
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user