diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-25 08:55:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-06-25 08:55:40 +0000 |
commit | 88bea4b8c200fad936c063718289250ce49cda61 (patch) | |
tree | 0c7cd93c45b07d4f9964f5c519afbf31b6c1fb34 /os/hal/platforms/STM8/serial_lld.h | |
parent | 62f4b7f471a4b1037468d382f927c5061e5fa9ed (diff) | |
download | ChibiOS-88bea4b8c200fad936c063718289250ce49cda61.tar.gz ChibiOS-88bea4b8c200fad936c063718289250ce49cda61.tar.bz2 ChibiOS-88bea4b8c200fad936c063718289250ce49cda61.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2038 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM8/serial_lld.h')
-rw-r--r-- | os/hal/platforms/STM8/serial_lld.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/os/hal/platforms/STM8/serial_lld.h b/os/hal/platforms/STM8/serial_lld.h index 58b0df012..f0bea84f7 100644 --- a/os/hal/platforms/STM8/serial_lld.h +++ b/os/hal/platforms/STM8/serial_lld.h @@ -58,6 +58,15 @@ #endif
/**
+ * @brief UART2 driver enable switch.
+ * @details If set to @p TRUE the support for UART3 is included.
+ * @note The default is @p TRUE.
+ */
+#if !defined(USE_STM8_UART2) || defined(__DOXYGEN__)
+#define USE_STM8_UART2 TRUE
+#endif
+
+/**
* @brief UART3 driver enable switch.
* @details If set to @p TRUE the support for UART3 is included.
* @note The default is @p TRUE.
@@ -70,6 +79,10 @@ /* Derived constants and error checks. */
/*===========================================================================*/
+#if USE_STM8_UART2 && USE_STM8_UART3
+#error "STM8 UART2 and UART3 cannot be used together"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
@@ -136,6 +149,9 @@ typedef struct { #if USE_STM8_UART1 && !defined(__DOXYGEN__)
extern SerialDriver SD1;
#endif
+#if USE_STM8_UART2 && !defined(__DOXYGEN__)
+extern SerialDriver SD2;
+#endif
#if USE_STM8_UART3 && !defined(__DOXYGEN__)
extern SerialDriver SD3;
#endif
|