diff options
author | Uladzimir Pylinski <barthess@yandex.ru> | 2016-07-19 18:56:03 +0000 |
---|---|---|
committer | Uladzimir Pylinski <barthess@yandex.ru> | 2016-07-19 18:56:03 +0000 |
commit | 0edf3f363b0e8222477f1bf956a421ab6e7d2cd5 (patch) | |
tree | 9f53cb6ac75e50776abe22373a41d820ca4255f2 /testhal/STM32/STM32F3xx/UART | |
parent | 57dc4418deee2b123301d36eec3a020acee3814b (diff) | |
download | ChibiOS-0edf3f363b0e8222477f1bf956a421ab6e7d2cd5.tar.gz ChibiOS-0edf3f363b0e8222477f1bf956a421ab6e7d2cd5.tar.bz2 ChibiOS-0edf3f363b0e8222477f1bf956a421ab6e7d2cd5.zip |
[STM32. USARTv2] Added receiver timeout handling.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9713 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32F3xx/UART')
-rw-r--r-- | testhal/STM32/STM32F3xx/UART/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testhal/STM32/STM32F3xx/UART/main.c b/testhal/STM32/STM32F3xx/UART/main.c index 30abb55d3..1ef5bb6b9 100644 --- a/testhal/STM32/STM32F3xx/UART/main.c +++ b/testhal/STM32/STM32F3xx/UART/main.c @@ -92,6 +92,14 @@ static void rxend(UARTDriver *uartp) { }
/*
+ * This callback is invoked when configured timeout reached.
+ */
+static void rxtimeout(UARTDriver *uartp) {
+
+ (void)uartp;
+}
+
+/*
* UART driver configuration structure.
*/
static UARTConfig uart_cfg_1 = {
@@ -100,6 +108,8 @@ static UARTConfig uart_cfg_1 = { rxend,
rxchar,
rxerr,
+ rxtimeout,
+ 0,
38400,
0,
USART_CR2_LINEN,
|