Fixed bug 3547297.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4477 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2012-07-22 16:26:21 +00:00
parent 546f0c3c31
commit 0c66e8a71b
1 changed files with 4 additions and 0 deletions

View File

@ -175,7 +175,11 @@ static void usart_start(UARTDriver *uartp) {
usart_stop(uartp); usart_stop(uartp);
/* Baud rate setting.*/ /* Baud rate setting.*/
#if STM32_HAS_USART6
if ((uartp->usart == USART1) || (uartp->usart == USART6)) if ((uartp->usart == USART1) || (uartp->usart == USART6))
#else
if (uartp->usart == USART1)
#endif
u->BRR = STM32_PCLK2 / uartp->config->speed; u->BRR = STM32_PCLK2 / uartp->config->speed;
else else
u->BRR = STM32_PCLK1 / uartp->config->speed; u->BRR = STM32_PCLK1 / uartp->config->speed;