diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-22 16:26:21 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-07-22 16:26:21 +0000 |
commit | 0c66e8a71b78e9ff5313809c36e9af2a64de9215 (patch) | |
tree | 364bfcfded666cf8c441e0e19746427d9598ae12 /os/hal | |
parent | 546f0c3c31e44d12859a8a114b4c404a9e5777a9 (diff) | |
download | ChibiOS-0c66e8a71b78e9ff5313809c36e9af2a64de9215.tar.gz ChibiOS-0c66e8a71b78e9ff5313809c36e9af2a64de9215.tar.bz2 ChibiOS-0c66e8a71b78e9ff5313809c36e9af2a64de9215.zip |
Fixed bug 3547297.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4477 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/STM32/USARTv1/uart_lld.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/USARTv1/uart_lld.c b/os/hal/platforms/STM32/USARTv1/uart_lld.c index 1e71ea016..b64230463 100644 --- a/os/hal/platforms/STM32/USARTv1/uart_lld.c +++ b/os/hal/platforms/STM32/USARTv1/uart_lld.c @@ -175,7 +175,11 @@ static void usart_start(UARTDriver *uartp) { usart_stop(uartp);
/* Baud rate setting.*/
+#if STM32_HAS_USART6
if ((uartp->usart == USART1) || (uartp->usart == USART6))
+#else
+ if (uartp->usart == USART1)
+#endif
u->BRR = STM32_PCLK2 / uartp->config->speed;
else
u->BRR = STM32_PCLK1 / uartp->config->speed;
|