XLite REV 0.2 support (#5785)

XLite REV 0.2 support
This commit is contained in:
Bertrand Songis
2018-04-02 20:37:34 +02:00
committed by GitHub
parent 6535ccbdd8
commit 329b753df5
6 changed files with 49 additions and 34 deletions
@@ -79,14 +79,14 @@ void telemetryPortInit(uint32_t baudrate, uint8_t mode)
void telemetryPortSetDirectionOutput()
{
TELEMETRY_DIR_GPIO->BSRRL = TELEMETRY_DIR_GPIO_PIN; // output enable
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
TELEMETRY_DIR_OUTPUT();
TELEMETRY_USART->CR1 &= ~USART_CR1_RE; // turn off receiver
}
void telemetryPortSetDirectionInput()
{
TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN; // output disable
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
TELEMETRY_DIR_INPUT();
TELEMETRY_USART->CR1 |= USART_CR1_RE; // turn on receiver
}
void sportSendBuffer(uint8_t * buffer, uint32_t count)