aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/serial_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-06 12:25:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-06 12:25:34 +0000
commit2848e99c07e4174412dd0879046b9c3f82961695 (patch)
treedfa821ed2f87c642b344fa831e98dac38c3d97b0 /os/hal/platforms/STM32/serial_lld.c
parent9e51498e1196b28e5c073a7505df2ae08f05b59a (diff)
downloadChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.tar.gz
ChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.tar.bz2
ChibiOS-2848e99c07e4174412dd0879046b9c3f82961695.zip
STM32F4 support working, most device drivers still to test, report added.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3475 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/serial_lld.c')
-rw-r--r--os/hal/platforms/STM32/serial_lld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c
index ce412dedb..d9d0836fd 100644
--- a/os/hal/platforms/STM32/serial_lld.c
+++ b/os/hal/platforms/STM32/serial_lld.c
@@ -90,7 +90,11 @@ static void usart_init(SerialDriver *sdp, const SerialConfig *config) {
/*
* Baud rate setting.
*/
+#if STM32_HAS_USART6
+ if ((sdp->usart == USART1) || (sdp->usart == USART6))
+#else
if (sdp->usart == USART1)
+#endif
u->BRR = STM32_PCLK2 / config->sc_speed;
else
u->BRR = STM32_PCLK1 / config->sc_speed;