aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32L1xx/SPI/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-30 13:04:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-09-30 13:04:10 +0000
commit8c1fc9af2b96a9a3ccae3d8810c21bd7afae97ab (patch)
tree27ab79db6ed83a893b78ee8d878a0ff416cca7b8 /testhal/STM32L1xx/SPI/main.c
parent984148e9dbda3053aec71ea7da545bc75cd33e94 (diff)
downloadChibiOS-8c1fc9af2b96a9a3ccae3d8810c21bd7afae97ab.tar.gz
ChibiOS-8c1fc9af2b96a9a3ccae3d8810c21bd7afae97ab.tar.bz2
ChibiOS-8c1fc9af2b96a9a3ccae3d8810c21bd7afae97ab.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6337 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32L1xx/SPI/main.c')
-rw-r--r--testhal/STM32L1xx/SPI/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/testhal/STM32L1xx/SPI/main.c b/testhal/STM32L1xx/SPI/main.c
index da394e97b..4931106fd 100644
--- a/testhal/STM32L1xx/SPI/main.c
+++ b/testhal/STM32L1xx/SPI/main.c
@@ -46,10 +46,11 @@ static uint8_t rxbuf[512];
/*
* SPI bus contender 1.
*/
-static WORKING_AREA(spi_thread_1_wa, 256);
-static msg_t spi_thread_1(void *p) {
+static THD_WORKING_AREA(spi_thread_1_wa, 256);
+static THD_FUNCTION(spi_thread_1, p) {
(void)p;
+
chRegSetThreadName("SPI thread 1");
while (TRUE) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
@@ -67,10 +68,11 @@ static msg_t spi_thread_1(void *p) {
/*
* SPI bus contender 2.
*/
-static WORKING_AREA(spi_thread_2_wa, 256);
-static msg_t spi_thread_2(void *p) {
+static THD_WORKING_AREA(spi_thread_2_wa, 256);
+static THD_FUNCTION(spi_thread_2, p) {
(void)p;
+
chRegSetThreadName("SPI thread 2");
while (TRUE) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */