Remove 9 bit word length on parity to fix SBus support for F1.
This commit is contained in:
parent
671d453709
commit
91178b520f
|
@ -79,7 +79,12 @@ void uartReconfigure(uartPort_t *uartPort)
|
||||||
|
|
||||||
// according to the stm32 documentation wordlen has to be 9 for parity bits
|
// 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!
|
// 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;
|
USART_InitStructure.USART_WordLength = USART_WordLength_9b;
|
||||||
} else {
|
} else {
|
||||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||||
|
|
Loading…
Reference in New Issue