Asym ghost support (#7910)

This commit is contained in:
3djc
2020-09-05 08:24:07 +02:00
committed by GitHub
parent 7f5dc552ef
commit 159a891ab4
10 changed files with 64 additions and 16 deletions
+1
View File
@@ -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
}