aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32L4xx/hal_lld.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-11-28 10:55:48 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-11-28 10:55:48 +0000
commit56cf40e555db653dc503afe4e750f23ef5cb66d6 (patch)
treec6784562e3034df9520dd1f070e2c82d03f5c9f6 /os/hal/ports/STM32/STM32L4xx/hal_lld.h
parent03f609e27c2dca200fce5b42f3a3467570e718bd (diff)
downloadChibiOS-56cf40e555db653dc503afe4e750f23ef5cb66d6.tar.gz
ChibiOS-56cf40e555db653dc503afe4e750f23ef5cb66d6.tar.bz2
ChibiOS-56cf40e555db653dc503afe4e750f23ef5cb66d6.zip
STM32 LPUART1 support added.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8539 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32L4xx/hal_lld.h')
-rw-r--r--os/hal/ports/STM32/STM32L4xx/hal_lld.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32L4xx/hal_lld.h b/os/hal/ports/STM32/STM32L4xx/hal_lld.h
index ec107d911..2827f2fa2 100644
--- a/os/hal/ports/STM32/STM32L4xx/hal_lld.h
+++ b/os/hal/ports/STM32/STM32L4xx/hal_lld.h
@@ -645,6 +645,13 @@
#endif
/**
+ * @brief LPUART1 clock source.
+ */
+#if !defined(STM32_LPUART1SEL) || defined(__DOXYGEN__)
+#define STM32_LPUART1SEL STM32_LPUART1SEL_SYSCLK
+#endif
+
+/**
* @brief I2C1 clock source.
*/
#if !defined(STM32_I2C1SEL) || defined(__DOXYGEN__)
@@ -1833,6 +1840,21 @@
#endif
/**
+ * @brief LPUART1 clock frequency.
+ */
+#if (STM32_LPUART1SEL == STM32_LPUART1SEL_PCLK1) || defined(__DOXYGEN)
+#define STM32_LPUART1CLK STM32_PCLK1
+#elif STM32_LPUART1SEL == STM32_LPUART1SEL_SYSCLK
+#define STM32_LPUART1CLK STM32_SYSCLK
+#elif STM32_LPUART1SEL == STM32_LPUART1SEL_HSI16
+#define STM32_LPUART1CLK STM32_HSI16CLK
+#elif STM32_LPUART1SEL == STM32_LPUART1SEL_LSE
+#define STM32_LPUART1CLK STM32_LSECLK
+#else
+#error "invalid source selected for LPUART1 clock"
+#endif
+
+/**
* @brief I2C1 clock frequency.
*/
#if (STM32_I2C1SEL == STM32_I2C1SEL_PCLK1) || defined(__DOXYGEN)