Merge pull request #3201 from mikeller/fix_sbus_for_f1

Remove 9 bit word length on parity to fix SBus support for F1.
This commit is contained in:
Michael Keller 2017-06-13 01:05:02 +12:00 committed by GitHub
commit 4ef052186e
1 changed files with 6 additions and 1 deletions

View File

@ -79,7 +79,12 @@ void uartReconfigure(uartPort_t *uartPort)
// according to the stm32 documentation wordlen has to be 9 for parity bits
// this does not seem to matter for rx but will give bad data on tx!
if (uartPort->port.options & SERIAL_PARITY_EVEN) {
// This seems to cause RX to break on STM32F1, see https://github.com/betaflight/betaflight/pull/1654
if (
#if defined(STM32F1)
false &&
#endif
(uartPort->port.options & SERIAL_PARITY_EVEN)) {
USART_InitStructure.USART_WordLength = USART_WordLength_9b;
} else {
USART_InitStructure.USART_WordLength = USART_WordLength_8b;