From 15d0007e9687428fe314e1369a9bb4eeb427cfcc Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 3 Apr 2015 12:48:22 +0000 Subject: Mass change, all thread functions now return void. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7849 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/KINETIS/RT-FREEDOM-K20D50M/main.c | 12 +++--------- demos/KINETIS/RT-FREEDOM-KL25Z/main.c | 12 +++--------- demos/KINETIS/RT-MCHCK-K20-SPI/main.c | 4 +--- demos/KINETIS/RT-TEENSY3/main.c | 8 +++----- 4 files changed, 10 insertions(+), 26 deletions(-) (limited to 'demos/KINETIS') diff --git a/demos/KINETIS/RT-FREEDOM-K20D50M/main.c b/demos/KINETIS/RT-FREEDOM-K20D50M/main.c index 4a65f5234..9a2ca0eb9 100644 --- a/demos/KINETIS/RT-FREEDOM-K20D50M/main.c +++ b/demos/KINETIS/RT-FREEDOM-K20D50M/main.c @@ -23,12 +23,10 @@ static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("RedBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT3, 3); chThdSleepMilliseconds(300); } - - return 0; } static THD_WORKING_AREA(waThread2, 64); @@ -36,12 +34,10 @@ static THD_FUNCTION(Thread2, arg) { (void)arg; chRegSetThreadName("GreenBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT4, 4); chThdSleepMilliseconds(600); } - - return 0; } static THD_WORKING_AREA(waThread3, 64); @@ -49,12 +45,10 @@ static THD_FUNCTION(Thread3, arg) { (void)arg; chRegSetThreadName("BlueBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT1, 2); chThdSleepMilliseconds(900); } - - return 0; } /* diff --git a/demos/KINETIS/RT-FREEDOM-KL25Z/main.c b/demos/KINETIS/RT-FREEDOM-KL25Z/main.c index f4cf28678..d565ca041 100644 --- a/demos/KINETIS/RT-FREEDOM-KL25Z/main.c +++ b/demos/KINETIS/RT-FREEDOM-KL25Z/main.c @@ -23,12 +23,10 @@ static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("RedBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT2, 18); chThdSleepMilliseconds(300); } - - return 0; } static THD_WORKING_AREA(waThread2, 64); @@ -36,12 +34,10 @@ static THD_FUNCTION(Thread2, arg) { (void)arg; chRegSetThreadName("GreenBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT2, 19); chThdSleepMilliseconds(600); } - - return 0; } static THD_WORKING_AREA(waThread3, 64); @@ -49,12 +45,10 @@ static THD_FUNCTION(Thread3, arg) { (void)arg; chRegSetThreadName("BlueBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT4, 1); chThdSleepMilliseconds(900); } - - return 0; } /* diff --git a/demos/KINETIS/RT-MCHCK-K20-SPI/main.c b/demos/KINETIS/RT-MCHCK-K20-SPI/main.c index b7530d2f2..909475944 100644 --- a/demos/KINETIS/RT-MCHCK-K20-SPI/main.c +++ b/demos/KINETIS/RT-MCHCK-K20-SPI/main.c @@ -42,7 +42,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("Blinker"); - while (TRUE) { + while (true) { palSetPad(GPIOB, GPIOB_LED); /* Send the Manufacturer and Device ID Read command */ @@ -54,8 +54,6 @@ static THD_FUNCTION(Thread1, arg) { chThdSleepMilliseconds(1000); } - - return 0; } /* diff --git a/demos/KINETIS/RT-TEENSY3/main.c b/demos/KINETIS/RT-TEENSY3/main.c index 9a541206d..591bd0ff8 100644 --- a/demos/KINETIS/RT-TEENSY3/main.c +++ b/demos/KINETIS/RT-TEENSY3/main.c @@ -22,16 +22,14 @@ * LED blinker thread. */ static THD_WORKING_AREA(waThread1, 64); -static msg_t Thread1(void *arg) { +static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("LEDBlinker"); - while (TRUE) { + while (true) { palTogglePad(IOPORT3, PORTC_TEENSY_PIN13); chThdSleepMilliseconds(500); } - - return 0; } /* @@ -60,7 +58,7 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); TestThread(&SD1); - while (TRUE) { + while (true) { chThdSleepMilliseconds(1000); } -- cgit v1.2.3