aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F30x/UART
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-19 15:07:47 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-19 15:07:47 +0000
commita042a8234acfdce62f65a5c72112f3256fade060 (patch)
treefab52fdade992466c216926e26f869d4d50f4fe3 /testhal/STM32F30x/UART
parent79ad42bc2b8e9013d0a02a9d758fa8af36322b27 (diff)
downloadChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.tar.gz
ChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.tar.bz2
ChibiOS-a042a8234acfdce62f65a5c72112f3256fade060.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6183 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F30x/UART')
-rw-r--r--testhal/STM32F30x/UART/.project2
-rw-r--r--testhal/STM32F30x/UART/main.c20
2 files changed, 10 insertions, 12 deletions
diff --git a/testhal/STM32F30x/UART/.project b/testhal/STM32F30x/UART/.project
index 24b9d53ce..15900d6dc 100644
--- a/testhal/STM32F30x/UART/.project
+++ b/testhal/STM32F30x/UART/.project
@@ -79,7 +79,7 @@
<link>
<name>board</name>
<type>2</type>
- <locationURI>CHIBIOS/boards/ST_STM32F3_DISCOVERY</locationURI>
+ <locationURI>CHIBIOS/os/hal/boards/ST_STM32F3_DISCOVERY</locationURI>
</link>
<link>
<name>os</name>
diff --git a/testhal/STM32F30x/UART/main.c b/testhal/STM32F30x/UART/main.c
index 9d0bea53c..170f14f20 100644
--- a/testhal/STM32F30x/UART/main.c
+++ b/testhal/STM32F30x/UART/main.c
@@ -17,15 +17,15 @@
#include "ch.h"
#include "hal.h"
-static VirtualTimer vt1, vt2;
+static virtual_timer_t vt1, vt2;
static void restart(void *p) {
(void)p;
- chSysLockFromIsr();
+ chSysLockFromISR();
uartStartSendI(&UARTD1, 14, "Hello World!\r\n");
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
static void ledoff(void *p) {
@@ -51,11 +51,10 @@ static void txend2(UARTDriver *uartp) {
(void)uartp;
palClearPad(GPIOE, GPIOE_LED3_RED);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt1))
- chVTResetI(&vt1);
+ chSysLockFromISR();
+ chVTResetI(&vt1);
chVTSetI(&vt1, MS2ST(5000), restart, NULL);
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
/*
@@ -78,11 +77,10 @@ static void rxchar(UARTDriver *uartp, uint16_t c) {
(void)c;
/* Flashing the LED each time a character is received.*/
palSetPad(GPIOE, GPIOE_LED3_RED);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt2))
- chVTResetI(&vt2);
+ chSysLockFromISR();
+ chVTResetI(&vt2);
chVTSetI(&vt2, MS2ST(200), ledoff, NULL);
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
/*