aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32F0xx
diff options
context:
space:
mode:
authorUladzimir Pylinski <barthess@yandex.ru>2016-07-19 18:56:03 +0000
committerUladzimir Pylinski <barthess@yandex.ru>2016-07-19 18:56:03 +0000
commit0edf3f363b0e8222477f1bf956a421ab6e7d2cd5 (patch)
tree9f53cb6ac75e50776abe22373a41d820ca4255f2 /testhal/STM32/STM32F0xx
parent57dc4418deee2b123301d36eec3a020acee3814b (diff)
downloadChibiOS-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/STM32F0xx')
-rw-r--r--testhal/STM32/STM32F0xx/UART/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/testhal/STM32/STM32F0xx/UART/main.c b/testhal/STM32/STM32F0xx/UART/main.c
index 16a7ba582..08c60b9ad 100644
--- a/testhal/STM32/STM32F0xx/UART/main.c
+++ b/testhal/STM32/STM32F0xx/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,