aboutsummaryrefslogtreecommitdiffstats
path: root/demos/KINETIS
diff options
context:
space:
mode:
Diffstat (limited to 'demos/KINETIS')
-rw-r--r--demos/KINETIS/RT-FREEDOM-K20D50M/main.c12
-rw-r--r--demos/KINETIS/RT-FREEDOM-KL25Z/main.c12
-rw-r--r--demos/KINETIS/RT-MCHCK-K20-SPI/main.c4
-rw-r--r--demos/KINETIS/RT-TEENSY3/main.c8
4 files changed, 10 insertions, 26 deletions
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);
}