aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-11-13 12:33:18 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-11-13 12:33:18 +0000
commitf098e079d0fd66419adbb226d7045ca810fe9890 (patch)
treee8f37bb7d9a2e04b18ea8a9474b76ef0f14012af /os/hal/templates
parent4fb6d9644ed9672096ddf813262f7d869dbfbb93 (diff)
downloadChibiOS-f098e079d0fd66419adbb226d7045ca810fe9890.tar.gz
ChibiOS-f098e079d0fd66419adbb226d7045ca810fe9890.tar.bz2
ChibiOS-f098e079d0fd66419adbb226d7045ca810fe9890.zip
Improved UART driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8479 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/uart_lld.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/os/hal/templates/uart_lld.h b/os/hal/templates/uart_lld.h
index 13d105b16..0451dcb21 100644
--- a/os/hal/templates/uart_lld.h
+++ b/os/hal/templates/uart_lld.h
@@ -143,6 +143,26 @@ struct UARTDriver {
* @brief Current configuration data.
*/
const UARTConfig *config;
+#if UART_USE_WAIT || defined(__DOXYGEN__)
+ /**
+ * @brief Synchronization flag for transmit operations.
+ */
+ bool early;
+ /**
+ * @brief Waiting thread on RX.
+ */
+ thread_reference_t threadrx;
+ /**
+ * @brief Waiting thread on TX.
+ */
+ thread_reference_t threadtx;
+#endif /* UART_USE_WAIT */
+#if UART_USE_MUTUAL_EXCLUSION || defined(__DOXYGEN__)
+ /**
+ * @brief Mutex protecting the peripheral.
+ */
+ mutex_t mutex;
+#endif /* UART_USE_MUTUAL_EXCLUSION */
#if defined(UART_DRIVER_EXT_FIELDS)
UART_DRIVER_EXT_FIELDS
#endif