aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/serial_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-29 13:15:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-12-29 13:15:29 +0000
commitdc403a00e86455bc65aabbd6c3d0fffe97b00ac4 (patch)
treeff317e8fc00accaa76bac2ab8493d4cef0dbb6f7 /os/hal/platforms/STM32/serial_lld.h
parent26790f9fb067095c855498241ababa35ce17e555 (diff)
downloadChibiOS-dc403a00e86455bc65aabbd6c3d0fffe97b00ac4.tar.gz
ChibiOS-dc403a00e86455bc65aabbd6c3d0fffe97b00ac4.tar.bz2
ChibiOS-dc403a00e86455bc65aabbd6c3d0fffe97b00ac4.zip
Updated all platforms.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1480 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/serial_lld.h')
-rw-r--r--os/hal/platforms/STM32/serial_lld.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/os/hal/platforms/STM32/serial_lld.h b/os/hal/platforms/STM32/serial_lld.h
index 774c97c81..073f8be1f 100644
--- a/os/hal/platforms/STM32/serial_lld.h
+++ b/os/hal/platforms/STM32/serial_lld.h
@@ -30,6 +30,10 @@
#if CH_HAL_USE_SERIAL || defined(__DOXYGEN__)
/*===========================================================================*/
+/* Driver constants. */
+/*===========================================================================*/
+
+/*===========================================================================*/
/* Driver pre-compile time settings. */
/*===========================================================================*/
@@ -40,7 +44,7 @@
* @note The default is 128 bytes for both the transmission and receive buffers.
*/
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
-#define SERIAL_BUFFERS_SIZE 128
+#define SERIAL_BUFFERS_SIZE 128
#endif
/**
@@ -49,7 +53,7 @@
* @note The default is @p FALSE.
*/
#if !defined(USE_STM32_USART1) || defined(__DOXYGEN__)
-#define USE_STM32_USART1 FALSE
+#define USE_STM32_USART1 FALSE
#endif
/**
@@ -58,7 +62,7 @@
* @note The default is @p TRUE.
*/
#if !defined(USE_STM32_USART2) || defined(__DOXYGEN__)
-#define USE_STM32_USART2 TRUE
+#define USE_STM32_USART2 TRUE
#endif
/**
@@ -67,7 +71,7 @@
* @note The default is @p FALSE.
*/
#if !defined(USE_STM32_USART3) || defined(__DOXYGEN__)
-#define USE_STM32_USART3 FALSE
+#define USE_STM32_USART3 FALSE
#endif
/**
@@ -75,7 +79,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART1_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_USART1_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_USART1_PRIORITY 0xC0
+#define STM32_USART1_PRIORITY 0xC0
#endif
/**
@@ -83,7 +87,7 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART2_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_USART2_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_USART2_PRIORITY 0xC0
+#define STM32_USART2_PRIORITY 0xC0
#endif
/**
@@ -91,21 +95,13 @@
* @note @p BASEPRI_KERNEL >= @p STM32_USART3_PRIORITY > @p PRIORITY_PENDSV.
*/
#if !defined(STM32_USART3_PRIORITY) || defined(__DOXYGEN__)
-#define STM32_USART3_PRIORITY 0xC0
+#define STM32_USART3_PRIORITY 0xC0
#endif
/*===========================================================================*/
-/* Driver macros. */
+/* Derived constants and error checks. */
/*===========================================================================*/
-/*
- * Extra USARTs definitions here (missing from the ST header file).
- */
-#define USART_CR2_STOP1_BITS (0 << 12) /**< @brief CR2 1 stop bit value.*/
-#define USART_CR2_STOP0P5_BITS (1 << 12) /**< @brief CR2 0.5 stop bit value.*/
-#define USART_CR2_STOP2_BITS (2 << 12) /**< @brief CR2 2 stop bit value.*/
-#define USART_CR2_STOP1P5_BITS (3 << 12) /**< @brief CR2 1.5 stop bit value.*/
-
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
@@ -166,6 +162,18 @@ typedef struct {
} SerialDriverConfig;
/*===========================================================================*/
+/* Driver macros. */
+/*===========================================================================*/
+
+/*
+ * Extra USARTs definitions here (missing from the ST header file).
+ */
+#define USART_CR2_STOP1_BITS (0 << 12) /**< @brief CR2 1 stop bit value.*/
+#define USART_CR2_STOP0P5_BITS (1 << 12) /**< @brief CR2 0.5 stop bit value.*/
+#define USART_CR2_STOP2_BITS (2 << 12) /**< @brief CR2 2 stop bit value.*/
+#define USART_CR2_STOP1P5_BITS (3 << 12) /**< @brief CR2 1.5 stop bit value.*/
+
+/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/