aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM8L/serial_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-12 18:59:49 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-11-12 18:59:49 +0000
commitc62c1a4d629a8ec5094e2c964640d64a07fa6063 (patch)
tree44f69b06722c5079062fdd36b8fde0f358ab02f8 /os/hal/platforms/STM8L/serial_lld.h
parente889040710fe8e5ee4454b01803d0c8522f489f0 (diff)
downloadChibiOS-c62c1a4d629a8ec5094e2c964640d64a07fa6063.tar.gz
ChibiOS-c62c1a4d629a8ec5094e2c964640d64a07fa6063.tar.bz2
ChibiOS-c62c1a4d629a8ec5094e2c964640d64a07fa6063.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2350 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM8L/serial_lld.h')
-rw-r--r--os/hal/platforms/STM8L/serial_lld.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/os/hal/platforms/STM8L/serial_lld.h b/os/hal/platforms/STM8L/serial_lld.h
index ac829cf1e..b523f048f 100644
--- a/os/hal/platforms/STM8L/serial_lld.h
+++ b/os/hal/platforms/STM8L/serial_lld.h
@@ -79,9 +79,16 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if defined(STM8L15X_MD) && \
- (STM8L_SERIAL_USE_USART2 || STM8L_SERIAL_USE_USART3)
-#error "STM8L15X_MD devices do not have USART2 and USART3"
+#if STM8L_SERIAL_USE_USART1 && !STM8L_HAS_USART1
+#error "USART1 enabled but not present"
+#endif
+
+#if STM8L_SERIAL_USE_USART2 && !STM8L_HAS_USART2
+#error "USART2 enabled but not present"
+#endif
+
+#if STM8L_SERIAL_USE_USART3 && !STM8L_HAS_USART3
+#error "USART3 enabled but not present"
#endif
/*===========================================================================*/
@@ -142,7 +149,7 @@ typedef struct {
* @brief Macro for baud rate computation.
* @note Make sure the final baud rate is within tolerance.
*/
-#define BBR(b) (SYSCLK / (b))
+#define BRR(b) (SYSCLK / (b))
#if STM8L_SERIAL_USE_USART1 || defined(__DOXYGEN__)
/**