aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-12 15:19:11 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-12 15:19:11 +0000
commitb01b63ed5aa6d47ac5f165b9944bbe5e140cd817 (patch)
tree3ea3fcda58672b3f8bb2df7feec6a3b2e0278809 /testhal
parent8ceaa9ca9916fda5ff51016170a2aa53766032a3 (diff)
downloadChibiOS-b01b63ed5aa6d47ac5f165b9944bbe5e140cd817.tar.gz
ChibiOS-b01b63ed5aa6d47ac5f165b9944bbe5e140cd817.tar.bz2
ChibiOS-b01b63ed5aa6d47ac5f165b9944bbe5e140cd817.zip
UART driver model improvements, templates and STM32 implementation updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2125 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/UART/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/testhal/STM32/UART/main.c b/testhal/STM32/UART/main.c
index 1ba3ec336..ef862a981 100644
--- a/testhal/STM32/UART/main.c
+++ b/testhal/STM32/UART/main.c
@@ -25,7 +25,9 @@ static VirtualTimer vt1, vt2;
static void restart(void *p) {
(void)p;
- uartStartSend(&UARTD2, 14, "Hello World!\r\n");
+ chSysLockFromIsr();
+ uartStartSendI(&UARTD2, 14, "Hello World!\r\n");
+ chSysUnlockFromIsr();
}
static void ledoff(void *p) {
@@ -50,6 +52,8 @@ static void txend2(void) {
palSetPad(IOPORT3, GPIOC_LED);
chSysLockFromIsr();
+ if (chVTIsArmedI(&vt1))
+ chVTResetI(&vt1);
chVTSetI(&vt1, MS2ST(5000), restart, NULL);
chSysUnlockFromIsr();
}