mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 17:55:30 +03:00
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:
commit
4ef052186e
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue