aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32L1xx
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-04-03 12:48:22 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-04-03 12:48:22 +0000
commit15d0007e9687428fe314e1369a9bb4eeb427cfcc (patch)
tree0ac60d4ec0245764ad601d763b0d3d5dc7c76539 /testhal/STM32/STM32L1xx
parent67b6d6cebf167faaf544886e1b1f41aaa404cb35 (diff)
downloadChibiOS-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 'testhal/STM32/STM32L1xx')
-rw-r--r--testhal/STM32/STM32L1xx/ADC/main.c4
-rw-r--r--testhal/STM32/STM32L1xx/EXT/main.c2
-rw-r--r--testhal/STM32/STM32L1xx/IRQ_STORM/main.c6
-rw-r--r--testhal/STM32/STM32L1xx/PWM-ICU/main.c2
-rw-r--r--testhal/STM32/STM32L1xx/SPI/main.c8
-rw-r--r--testhal/STM32/STM32L1xx/UART/main.c2
6 files changed, 11 insertions, 13 deletions
diff --git a/testhal/STM32/STM32L1xx/ADC/main.c b/testhal/STM32/STM32L1xx/ADC/main.c
index d00652432..9ca096a51 100644
--- a/testhal/STM32/STM32L1xx/ADC/main.c
+++ b/testhal/STM32/STM32L1xx/ADC/main.c
@@ -100,7 +100,7 @@ static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
- while (TRUE) {
+ while (true) {
palSetPad(GPIOB, GPIOB_LED4);
chThdSleepMilliseconds(500);
palClearPad(GPIOB, GPIOB_LED4);
@@ -154,7 +154,7 @@ int main(void) {
/*
* Normal main() thread activity, in this demo it does nothing.
*/
- while (TRUE) {
+ while (true) {
if (palReadPad(GPIOA, GPIOA_BUTTON)) {
adcStopConversion(&ADCD1);
adcSTM32DisableTSVREFE();
diff --git a/testhal/STM32/STM32L1xx/EXT/main.c b/testhal/STM32/STM32L1xx/EXT/main.c
index cae04dfb7..26ea0359c 100644
--- a/testhal/STM32/STM32L1xx/EXT/main.c
+++ b/testhal/STM32/STM32L1xx/EXT/main.c
@@ -89,7 +89,7 @@ int main(void) {
* Normal main() thread activity, in this demo it enables and disables the
* button EXT channel using 5 seconds intervals.
*/
- while (TRUE) {
+ while (true) {
chThdSleepMilliseconds(5000);
extChannelDisable(&EXTD1, 0);
chThdSleepMilliseconds(5000);
diff --git a/testhal/STM32/STM32L1xx/IRQ_STORM/main.c b/testhal/STM32/STM32L1xx/IRQ_STORM/main.c
index 675e94699..3d3ea3a1f 100644
--- a/testhal/STM32/STM32L1xx/IRQ_STORM/main.c
+++ b/testhal/STM32/STM32L1xx/IRQ_STORM/main.c
@@ -58,7 +58,7 @@ static msg_t b[NUM_THREADS][MAILBOX_SIZE];
* Test worker threads.
*/
static THD_WORKING_AREA(waWorkerThread[NUM_THREADS], 128);
-static msg_t WorkerThread(void *arg) {
+static THD_FUNCTION(WorkerThread, arg) {
static volatile unsigned x = 0;
static unsigned cnt = 0;
unsigned me = (unsigned)arg;
@@ -69,7 +69,7 @@ static msg_t WorkerThread(void *arg) {
chRegSetThreadName("worker");
/* Work loop.*/
- while (TRUE) {
+ while (true) {
/* Waiting for a message.*/
chMBFetch(&mb[me], &msg, TIME_INFINITE);
@@ -329,7 +329,7 @@ int main(void) {
/*
* Normal main() thread activity, nothing in this test.
*/
- while (TRUE) {
+ while (true) {
chThdSleepMilliseconds(5000);
}
}
diff --git a/testhal/STM32/STM32L1xx/PWM-ICU/main.c b/testhal/STM32/STM32L1xx/PWM-ICU/main.c
index b70b06435..610b90912 100644
--- a/testhal/STM32/STM32L1xx/PWM-ICU/main.c
+++ b/testhal/STM32/STM32L1xx/PWM-ICU/main.c
@@ -136,7 +136,7 @@ int main(void) {
/*
* Normal main() thread activity, in this demo it does nothing.
*/
- while (TRUE) {
+ while (true) {
chThdSleepMilliseconds(500);
}
return 0;
diff --git a/testhal/STM32/STM32L1xx/SPI/main.c b/testhal/STM32/STM32L1xx/SPI/main.c
index 3ba87936a..287597da6 100644
--- a/testhal/STM32/STM32L1xx/SPI/main.c
+++ b/testhal/STM32/STM32L1xx/SPI/main.c
@@ -52,7 +52,7 @@ static THD_FUNCTION(spi_thread_1, p) {
(void)p;
chRegSetThreadName("SPI thread 1");
- while (TRUE) {
+ while (true) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
palSetPad(GPIOB, GPIOB_LED4); /* LED ON. */
spiStart(&SPID2, &hs_spicfg); /* Setup transfer parameters. */
@@ -62,7 +62,6 @@ static THD_FUNCTION(spi_thread_1, p) {
spiUnselect(&SPID2); /* Slave Select de-assertion. */
spiReleaseBus(&SPID2); /* Ownership release. */
}
- return 0;
}
/*
@@ -74,7 +73,7 @@ static THD_FUNCTION(spi_thread_2, p) {
(void)p;
chRegSetThreadName("SPI thread 2");
- while (TRUE) {
+ while (true) {
spiAcquireBus(&SPID2); /* Acquire ownership of the bus. */
palClearPad(GPIOB, GPIOB_LED4); /* LED OFF. */
spiStart(&SPID2, &ls_spicfg); /* Setup transfer parameters. */
@@ -84,7 +83,6 @@ static THD_FUNCTION(spi_thread_2, p) {
spiUnselect(&SPID2); /* Slave Select de-assertion. */
spiReleaseBus(&SPID2); /* Ownership release. */
}
- return 0;
}
/*
@@ -132,7 +130,7 @@ int main(void) {
/*
* Normal main() thread activity, in this demo it does nothing.
*/
- while (TRUE) {
+ while (true) {
chThdSleepMilliseconds(500);
}
return 0;
diff --git a/testhal/STM32/STM32L1xx/UART/main.c b/testhal/STM32/STM32L1xx/UART/main.c
index 106f246d5..04b40d752 100644
--- a/testhal/STM32/STM32L1xx/UART/main.c
+++ b/testhal/STM32/STM32L1xx/UART/main.c
@@ -136,7 +136,7 @@ int main(void) {
/*
* Normal main() thread activity, in this demo it does nothing.
*/
- while (TRUE) {
+ while (true) {
chThdSleepMilliseconds(500);
}
}