diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-29 10:39:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-29 10:39:31 +0000 |
commit | 2c928f2833afa53ec045adafb39d85b84685a2d8 (patch) | |
tree | a542c9dc0184d3681dfded286fcf8d75edcf3f69 /testhal/STM32F37x/SPI/main.c | |
parent | 67177198e9228a0b8c8086d85ba206ad8164bd01 (diff) | |
download | ChibiOS-2c928f2833afa53ec045adafb39d85b84685a2d8.tar.gz ChibiOS-2c928f2833afa53ec045adafb39d85b84685a2d8.tar.bz2 ChibiOS-2c928f2833afa53ec045adafb39d85b84685a2d8.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6330 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F37x/SPI/main.c')
-rw-r--r-- | testhal/STM32F37x/SPI/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/testhal/STM32F37x/SPI/main.c b/testhal/STM32F37x/SPI/main.c index 3a828f3a9..7c005122a 100644 --- a/testhal/STM32F37x/SPI/main.c +++ b/testhal/STM32F37x/SPI/main.c @@ -48,10 +48,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. */
@@ -69,10 +70,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. */
@@ -91,10 +93,11 @@ static msg_t spi_thread_2(void *p) { * This is a periodic thread that does absolutely nothing except flashing
* a LED.
*/
-static WORKING_AREA(blinker_wa, 128);
-static msg_t blinker(void *arg) {
+static THD_WORKING_AREA(blinker_wa, 128);
+static THD_FUNCTION(blinker, arg) {
(void)arg;
+
chRegSetThreadName("blinker");
while (TRUE) {
palSetPad(GPIOC, GPIOC_LED1);
|