diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-03 12:48:22 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-03 12:48:22 +0000 |
commit | 15d0007e9687428fe314e1369a9bb4eeb427cfcc (patch) | |
tree | 0ac60d4ec0245764ad601d763b0d3d5dc7c76539 /demos/STM32 | |
parent | 67b6d6cebf167faaf544886e1b1f41aaa404cb35 (diff) | |
download | ChibiOS-15d0007e9687428fe314e1369a9bb4eeb427cfcc.tar.gz ChibiOS-15d0007e9687428fe314e1369a9bb4eeb427cfcc.tar.bz2 ChibiOS-15d0007e9687428fe314e1369a9bb4eeb427cfcc.zip |
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
Diffstat (limited to 'demos/STM32')
20 files changed, 39 insertions, 39 deletions
diff --git a/demos/STM32/CMSIS-STM32F407-DISCOVERY/main.c b/demos/STM32/CMSIS-STM32F407-DISCOVERY/main.c index 2ec461bb6..fbb365c80 100644 --- a/demos/STM32/CMSIS-STM32F407-DISCOVERY/main.c +++ b/demos/STM32/CMSIS-STM32F407-DISCOVERY/main.c @@ -25,7 +25,7 @@ static void Thread1(void const *arg) { (void)arg;
- while (TRUE) {
+ while (true) {
palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
osDelay(500);
palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
@@ -67,7 +67,7 @@ int main(void) { /* In the ChibiOS/RT CMSIS RTOS implementation the main() is an
usable thread, here we just sleep in a loop printing a message.*/
- while (TRUE) {
+ while (true) {
sdWrite(&SD2, (uint8_t *)"Hello World!\r\n", 14);
osDelay(500);
}
diff --git a/demos/STM32/RT-STM32F030R8-NUCLEO/main.c b/demos/STM32/RT-STM32F030R8-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32F030R8-NUCLEO/main.c +++ b/demos/STM32/RT-STM32F030R8-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F051-DISCOVERY/main.c b/demos/STM32/RT-STM32F051-DISCOVERY/main.c index a2e6095ed..f3e18f96e 100644 --- a/demos/STM32/RT-STM32F051-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F051-DISCOVERY/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker1");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOC, GPIOC_LED4);
chThdSleepMilliseconds(500);
palSetPad(GPIOC, GPIOC_LED4);
@@ -42,7 +42,7 @@ static THD_FUNCTION(Thread2, arg) { (void)arg;
chRegSetThreadName("blinker2");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOC, GPIOC_LED3);
chThdSleepMilliseconds(250);
palSetPad(GPIOC, GPIOC_LED3);
@@ -85,7 +85,7 @@ int main(void) { * pressed the test procedure is launched with output on the serial
* driver 1.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD1);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F072-DISCOVERY/main.c b/demos/STM32/RT-STM32F072-DISCOVERY/main.c index 4f6a22754..bd2cc1d25 100644 --- a/demos/STM32/RT-STM32F072-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F072-DISCOVERY/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker1");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOC, GPIOC_LED_BLUE);
chThdSleepMilliseconds(500);
palSetPad(GPIOC, GPIOC_LED_BLUE);
@@ -42,7 +42,7 @@ static THD_FUNCTION(Thread2, arg) { (void)arg;
chRegSetThreadName("blinker2");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOC, GPIOC_LED_GREEN);
chThdSleepMilliseconds(250);
palSetPad(GPIOC, GPIOC_LED_GREEN);
@@ -85,7 +85,7 @@ int main(void) { * pressed the test procedure is launched with output on the serial
* driver 1.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD1);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F100-DISCOVERY/main.c b/demos/STM32/RT-STM32F100-DISCOVERY/main.c index 1ce8f73ab..f2afcea23 100644 --- a/demos/STM32/RT-STM32F100-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F100-DISCOVERY/main.c @@ -84,7 +84,7 @@ int main(void) { * sleeping in a loop and check the button state, when the button is
* pressed the test procedure is launched.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD1);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F103-MAPLEMINI/main.c b/demos/STM32/RT-STM32F103-MAPLEMINI/main.c index 545183c41..44eddabd1 100644 --- a/demos/STM32/RT-STM32F103-MAPLEMINI/main.c +++ b/demos/STM32/RT-STM32F103-MAPLEMINI/main.c @@ -143,7 +143,7 @@ static __attribute__((noreturn)) THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
systime_t time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
palClearPad(GPIOB, GPIOB_LED);
chThdSleepMilliseconds(time);
@@ -198,7 +198,7 @@ int __attribute__((noreturn)) main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!shelltp && (SDU1.config->usbp->state == USB_ACTIVE))
shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
else if (chThdTerminatedX(shelltp)) {
diff --git a/demos/STM32/RT-STM32F103-OLIMEX_STM32_P103/main.c b/demos/STM32/RT-STM32F103-OLIMEX_STM32_P103/main.c index a363cf166..4b5d556e6 100644 --- a/demos/STM32/RT-STM32F103-OLIMEX_STM32_P103/main.c +++ b/demos/STM32/RT-STM32F103-OLIMEX_STM32_P103/main.c @@ -66,7 +66,7 @@ int main(void) { * sleeping in a loop and check the button state, when the button is
* pressed the test procedure is launched.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F103RB-NUCLEO/main.c b/demos/STM32/RT-STM32F103RB-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32F103RB-NUCLEO/main.c +++ b/demos/STM32/RT-STM32F103RB-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/main.c b/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/main.c index ae3741d84..bce8983bb 100644 --- a/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F103_INEMO_DISCOVERY/main.c @@ -143,7 +143,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
systime_t time = serusbcfg.usbp->state == USB_ACTIVE ? 250 : 500;
palClearPad(GPIOA, GPIOA_LED_BLUE);
chThdSleepMilliseconds(time);
@@ -198,7 +198,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!shelltp && (SDU1.config->usbp->state == USB_ACTIVE))
shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
else if (chThdTerminatedX(shelltp)) {
diff --git a/demos/STM32/RT-STM32F303-DISCOVERY/main.c b/demos/STM32/RT-STM32F303-DISCOVERY/main.c index ec9c1e502..d5ac58197 100644 --- a/demos/STM32/RT-STM32F303-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F303-DISCOVERY/main.c @@ -110,7 +110,7 @@ int main(void) { * sleeping in a loop and check the button state, when the button is
* pressed the test procedure is launched.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD1);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F334R8-NUCLEO/main.c b/demos/STM32/RT-STM32F334R8-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32F334R8-NUCLEO/main.c +++ b/demos/STM32/RT-STM32F334R8-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F373-STM32373C_EVAL/main.c b/demos/STM32/RT-STM32F373-STM32373C_EVAL/main.c index 94039ddb2..256c6d763 100644 --- a/demos/STM32/RT-STM32F373-STM32373C_EVAL/main.c +++ b/demos/STM32/RT-STM32F373-STM32373C_EVAL/main.c @@ -27,7 +27,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOC, GPIOC_LED1);
chThdSleepMilliseconds(250);
palSetPad(GPIOC, GPIOC_LED1);
@@ -74,7 +74,7 @@ int main(void) { * sleeping in a loop and check the button state, when the button is
* pressed the test procedure is launched.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_WKUP_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F401RE-NUCLEO/main.c b/demos/STM32/RT-STM32F401RE-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32F401RE-NUCLEO/main.c +++ b/demos/STM32/RT-STM32F401RE-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/main.c b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/main.c index 640a8fc9d..5f102f6a8 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/main.c +++ b/demos/STM32/RT-STM32F407-DISCOVERY-MEMS/main.c @@ -166,7 +166,7 @@ static THD_FUNCTION(Thread1, arg) { /* Reader thread loop.*/
time = chVTGetSystemTime();
- while (TRUE) {
+ while (true) {
int32_t x, y;
unsigned i;
@@ -306,7 +306,7 @@ int main(void) { * Normal main() thread activity, in this demo it just performs
* a shell respawn upon its termination.
*/
- while (TRUE) {
+ while (true) {
if (!shelltp) {
if (SDU1.config->usbp->state == USB_ACTIVE) {
/* Spawns a new shell.*/
diff --git a/demos/STM32/RT-STM32F407-DISCOVERY/main.c b/demos/STM32/RT-STM32F407-DISCOVERY/main.c index e6930f4e8..1049ea7cc 100644 --- a/demos/STM32/RT-STM32F407-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F407-DISCOVERY/main.c @@ -27,7 +27,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palSetPad(GPIOD, GPIOD_LED3); /* Orange. */
chThdSleepMilliseconds(500);
palClearPad(GPIOD, GPIOD_LED3); /* Orange. */
@@ -67,7 +67,7 @@ int main(void) { * Normal main() thread activity, in this demo it just performs
* a shell respawn upon its termination.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c index b79169664..0e38e87a1 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c @@ -595,7 +595,7 @@ static msg_t Thread1(void *arg) { (void)arg; chRegSetThreadName("blinker"); - while (TRUE) { + while (true) { palTogglePad(GPIOC, GPIOC_LED); chThdSleepMilliseconds(fs_ready ? 125 : 500); } @@ -680,7 +680,7 @@ int main(void) { */ chEvtRegister(&inserted_event, &el0, 0); chEvtRegister(&removed_event, &el1, 1); - while (TRUE) { + while (true) { if (!shelltp && (SDU2.config->usbp->state == USB_ACTIVE)) shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO); else if (chThdTerminatedX(shelltp)) { diff --git a/demos/STM32/RT-STM32F411RE-NUCLEO/main.c b/demos/STM32/RT-STM32F411RE-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32F411RE-NUCLEO/main.c +++ b/demos/STM32/RT-STM32F411RE-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32F429-DISCOVERY/main.c b/demos/STM32/RT-STM32F429-DISCOVERY/main.c index 3237e4d51..e0a371611 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32F429-DISCOVERY/main.c @@ -31,7 +31,7 @@ static msg_t Thread1(void *arg) { (void)arg;
chRegSetThreadName("blinker1");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOG, GPIOG_LED4_RED);
chThdSleepMilliseconds(500);
palSetPad(GPIOG, GPIOG_LED4_RED);
@@ -47,7 +47,7 @@ static msg_t Thread2(void *arg) { (void)arg;
chRegSetThreadName("blinker2");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOG, GPIOG_LED3_GREEN);
chThdSleepMilliseconds(250);
palSetPad(GPIOG, GPIOG_LED3_GREEN);
@@ -181,7 +181,7 @@ int main(void) { * Normal main() thread activity, in this demo it just performs
* a shell respawn upon its termination.
*/
- while (TRUE) {
+ while (true) {
if (!shelltp) {
if (SDU1.config->usbp->state == USB_ACTIVE) {
/* Spawns a new shell.*/
diff --git a/demos/STM32/RT-STM32L152-DISCOVERY/main.c b/demos/STM32/RT-STM32L152-DISCOVERY/main.c index 800f3e822..86e1912cd 100644 --- a/demos/STM32/RT-STM32L152-DISCOVERY/main.c +++ b/demos/STM32/RT-STM32L152-DISCOVERY/main.c @@ -86,7 +86,7 @@ int main(void) { * sleeping in a loop and check the button state, when the button is
* pressed the test procedure is launched.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON))
TestThread(&SD1);
chThdSleepMilliseconds(500);
diff --git a/demos/STM32/RT-STM32L152RE-NUCLEO/main.c b/demos/STM32/RT-STM32L152RE-NUCLEO/main.c index 1ad4c7bc5..bd50f191d 100644 --- a/demos/STM32/RT-STM32L152RE-NUCLEO/main.c +++ b/demos/STM32/RT-STM32L152RE-NUCLEO/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(Thread1, arg) { (void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palClearPad(GPIOA, GPIOA_LED_GREEN);
chThdSleepMilliseconds(500);
palSetPad(GPIOA, GPIOA_LED_GREEN);
@@ -63,7 +63,7 @@ int main(void) { * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop and check the button state.
*/
- while (TRUE) {
+ while (true) {
if (!palReadPad(GPIOC, GPIOC_BUTTON))
TestThread(&SD2);
chThdSleepMilliseconds(500);
|