aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/SPI/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
commit4b049c1f175144f8583df5eb9e3a620ac306ee98 (patch)
treed20a3ec4de726fbfb746c6062061e24b7ac3d3be /testhal/STM32F1xx/SPI/main.c
parentfe65d988275f509d3e7b71014c19c1d1aefac035 (diff)
downloadChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.gz
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.bz2
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6353 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F1xx/SPI/main.c')
-rw-r--r--testhal/STM32F1xx/SPI/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/testhal/STM32F1xx/SPI/main.c b/testhal/STM32F1xx/SPI/main.c
index 35b7c3b42..674d5d284 100644
--- a/testhal/STM32F1xx/SPI/main.c
+++ b/testhal/STM32F1xx/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(&SPID1); /* 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(&SPID1); /* Acquire ownership of the bus. */