Asym ghost support (#7910)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user