1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

Add 230400 & 250000 baud rates, 2 stop-bits port mode

This commit is contained in:
Nicholas Sherlock 2015-03-06 20:07:07 +13:00
parent 3e73b3de53
commit cbaa67f1d0
4 changed files with 10 additions and 3 deletions

View file

@ -79,7 +79,11 @@ static void uartReconfigure(uartPort_t *uartPort)
USART_InitStructure.USART_StopBits = USART_StopBits_2;
USART_InitStructure.USART_Parity = USART_Parity_Even;
} else {
USART_InitStructure.USART_StopBits = USART_StopBits_1;
if (uartPort->port.mode & MODE_STOPBITS2)
USART_InitStructure.USART_StopBits = USART_StopBits_2;
else
USART_InitStructure.USART_StopBits = USART_StopBits_1;
USART_InitStructure.USART_Parity = USART_Parity_No;
}
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;