diff options
author | Theodore Ateba <tf.ateba@gmail.com> | 2018-02-04 13:36:12 +0000 |
---|---|---|
committer | Theodore Ateba <tf.ateba@gmail.com> | 2018-02-04 13:36:12 +0000 |
commit | dacb403627fc97dce0bf64b3c4ebecb879f3ce0d (patch) | |
tree | 4afb0b26909f7697d8c854e60ada14499c7585b0 | |
parent | d9ad41cec2dd7f2d23e2a700adfcf7a35568d43c (diff) | |
download | ChibiOS-dacb403627fc97dce0bf64b3c4ebecb879f3ce0d.tar.gz ChibiOS-dacb403627fc97dce0bf64b3c4ebecb879f3ce0d.tar.bz2 ChibiOS-dacb403627fc97dce0bf64b3c4ebecb879f3ce0d.zip |
Update all demos comments and indent
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11429 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/AVR/NIL-ARDUINO-MEGA/main.c | 2 | ||||
-rw-r--r-- | demos/AVR/NIL-ARDUINO-MINI/main.c | 2 | ||||
-rw-r--r-- | demos/AVR/NIL-ARDUINO-NANO/main.c | 2 | ||||
-rw-r--r-- | demos/AVR/NIL-ARDUINO-UNO/main.c | 2 | ||||
-rw-r--r-- | demos/AVR/RT-ARDUINO-LEONARDO/main.c | 2 | ||||
-rw-r--r-- | demos/AVR/RT-ARDUINO-MEGA/main.c | 3 | ||||
-rw-r--r-- | demos/AVR/RT-ARDUINO-MINI/main.c | 5 | ||||
-rw-r--r-- | demos/AVR/RT-ARDUINO-NANO/main.c | 5 | ||||
-rw-r--r-- | demos/AVR/RT-ARDUINO-UNO/main.c | 8 | ||||
-rw-r--r-- | demos/AVR/RT-DIGISPARK-ATTINY-167/main.c | 10 | ||||
-rw-r--r-- | demos/AVR/RT-MT-DB-X4/main.c | 6 | ||||
-rw-r--r-- | demos/AVR/RT-PRO-MICRO/main.c | 5 | ||||
-rw-r--r-- | demos/AVR/RT-TEENSY2-USB/main.c | 3 | ||||
-rw-r--r-- | demos/AVR/TEST-SUITE-OSLIB/main.c | 7 | ||||
-rw-r--r-- | demos/AVR/TEST-SUITE-RT/main.c | 7 |
15 files changed, 43 insertions, 26 deletions
diff --git a/demos/AVR/NIL-ARDUINO-MEGA/main.c b/demos/AVR/NIL-ARDUINO-MEGA/main.c index c36bbd675..2880d787a 100644 --- a/demos/AVR/NIL-ARDUINO-MEGA/main.c +++ b/demos/AVR/NIL-ARDUINO-MEGA/main.c @@ -41,7 +41,7 @@ THD_FUNCTION(Thread2, arg) { /*
* Activates the serial driver 1 using the driver default configuration.
- * PA9 and PA10 are routed to USART1.
+ * PE0(RX) and PE1(TX) are routed to USART0.
*/
sdStart(&SD1, NULL);
diff --git a/demos/AVR/NIL-ARDUINO-MINI/main.c b/demos/AVR/NIL-ARDUINO-MINI/main.c index c36bbd675..b0d982e45 100644 --- a/demos/AVR/NIL-ARDUINO-MINI/main.c +++ b/demos/AVR/NIL-ARDUINO-MINI/main.c @@ -41,7 +41,7 @@ THD_FUNCTION(Thread2, arg) { /*
* Activates the serial driver 1 using the driver default configuration.
- * PA9 and PA10 are routed to USART1.
+ * PD0(RX) and PD1(TX) are routed to USART0.
*/
sdStart(&SD1, NULL);
diff --git a/demos/AVR/NIL-ARDUINO-NANO/main.c b/demos/AVR/NIL-ARDUINO-NANO/main.c index c36bbd675..b0d982e45 100644 --- a/demos/AVR/NIL-ARDUINO-NANO/main.c +++ b/demos/AVR/NIL-ARDUINO-NANO/main.c @@ -41,7 +41,7 @@ THD_FUNCTION(Thread2, arg) { /*
* Activates the serial driver 1 using the driver default configuration.
- * PA9 and PA10 are routed to USART1.
+ * PD0(RX) and PD1(TX) are routed to USART0.
*/
sdStart(&SD1, NULL);
diff --git a/demos/AVR/NIL-ARDUINO-UNO/main.c b/demos/AVR/NIL-ARDUINO-UNO/main.c index c36bbd675..b0d982e45 100644 --- a/demos/AVR/NIL-ARDUINO-UNO/main.c +++ b/demos/AVR/NIL-ARDUINO-UNO/main.c @@ -41,7 +41,7 @@ THD_FUNCTION(Thread2, arg) { /*
* Activates the serial driver 1 using the driver default configuration.
- * PA9 and PA10 are routed to USART1.
+ * PD0(RX) and PD1(TX) are routed to USART0.
*/
sdStart(&SD1, NULL);
diff --git a/demos/AVR/RT-ARDUINO-LEONARDO/main.c b/demos/AVR/RT-ARDUINO-LEONARDO/main.c index 4d3c03f42..7f770d392 100644 --- a/demos/AVR/RT-ARDUINO-LEONARDO/main.c +++ b/demos/AVR/RT-ARDUINO-LEONARDO/main.c @@ -70,7 +70,7 @@ int main(void) { */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- while(TRUE) {
+ while (TRUE) {
if (SDU1.config->usbp->state == USB_ACTIVE) {
chnWrite(&SDU1, (const uint8_t *)"Hello from Arduino Leonardo!\r\n", 30);
}
diff --git a/demos/AVR/RT-ARDUINO-MEGA/main.c b/demos/AVR/RT-ARDUINO-MEGA/main.c index fbfbbbae5..259b56750 100644 --- a/demos/AVR/RT-ARDUINO-MEGA/main.c +++ b/demos/AVR/RT-ARDUINO-MEGA/main.c @@ -17,6 +17,9 @@ #include "ch.h"
#include "hal.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
diff --git a/demos/AVR/RT-ARDUINO-MINI/main.c b/demos/AVR/RT-ARDUINO-MINI/main.c index b4c0176c5..14a77d891 100644 --- a/demos/AVR/RT-ARDUINO-MINI/main.c +++ b/demos/AVR/RT-ARDUINO-MINI/main.c @@ -17,6 +17,9 @@ #include "ch.h"
#include "hal.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -43,8 +46,6 @@ int main(void) { halInit();
chSysInit();
- palClearPad(IOPORT2, PORTB_LED1);
-
/*
* Activates the serial driver 1 using the driver default configuration.
*/
diff --git a/demos/AVR/RT-ARDUINO-NANO/main.c b/demos/AVR/RT-ARDUINO-NANO/main.c index 3356fa6d9..72137021c 100644 --- a/demos/AVR/RT-ARDUINO-NANO/main.c +++ b/demos/AVR/RT-ARDUINO-NANO/main.c @@ -17,6 +17,9 @@ #include "ch.h"
#include "hal.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -43,8 +46,6 @@ int main(void) { halInit();
chSysInit();
- palClearPad(IOPORT2, PORTB_LED1);
-
/*
* Activates the serial driver 1 using the driver default configuration.
*/
diff --git a/demos/AVR/RT-ARDUINO-UNO/main.c b/demos/AVR/RT-ARDUINO-UNO/main.c index b4c0176c5..d5696e3e3 100644 --- a/demos/AVR/RT-ARDUINO-UNO/main.c +++ b/demos/AVR/RT-ARDUINO-UNO/main.c @@ -17,6 +17,9 @@ #include "ch.h"
#include "hal.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -43,8 +46,6 @@ int main(void) { halInit();
chSysInit();
- palClearPad(IOPORT2, PORTB_LED1);
-
/*
* Activates the serial driver 1 using the driver default configuration.
*/
@@ -56,7 +57,8 @@ int main(void) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
- while(TRUE) {
+
+ while (TRUE) {
chThdSleepMilliseconds(1000);
}
}
diff --git a/demos/AVR/RT-DIGISPARK-ATTINY-167/main.c b/demos/AVR/RT-DIGISPARK-ATTINY-167/main.c index 96ee92295..5c1332643 100644 --- a/demos/AVR/RT-DIGISPARK-ATTINY-167/main.c +++ b/demos/AVR/RT-DIGISPARK-ATTINY-167/main.c @@ -29,12 +29,14 @@ const UARTConfig uartConf = { 38400, /* UART baudrate. */
};
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("Blinker");
-
while (true) {
palTogglePad(IOPORT2, PORTB_LED1);
uartStartSend(&UARTD1, 30, (const void *) "ChibiOS PORT on ATtiny-167!.\n\r");
@@ -57,9 +59,7 @@ int main(void) { halInit();
chSysInit();
- //palClearPad(IOPORT2, PORTB_LED1);
-
- /*
+ /*
* Initialize the UART interface.
*/
uartInit();
@@ -79,7 +79,7 @@ int main(void) { */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- while(TRUE) {
+ while (TRUE) {
chThdSleepMilliseconds(1000);
}
}
diff --git a/demos/AVR/RT-MT-DB-X4/main.c b/demos/AVR/RT-MT-DB-X4/main.c index 706cef7a8..cf97486db 100644 --- a/demos/AVR/RT-MT-DB-X4/main.c +++ b/demos/AVR/RT-MT-DB-X4/main.c @@ -17,12 +17,14 @@ #include "ch.h"
#include "hal.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("Blinker");
-
while (true) {
palClearPad(IOPORT5, PORTE_LED);
chThdSleepMilliseconds(1000);
@@ -51,7 +53,7 @@ int main(void) { */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- while(TRUE) {
+ while (TRUE) {
chThdSleepMilliseconds(100);
}
}
diff --git a/demos/AVR/RT-PRO-MICRO/main.c b/demos/AVR/RT-PRO-MICRO/main.c index 4c2d57299..38447aa97 100644 --- a/demos/AVR/RT-PRO-MICRO/main.c +++ b/demos/AVR/RT-PRO-MICRO/main.c @@ -20,6 +20,9 @@ SerialUSBDriver SDU1;
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -70,7 +73,7 @@ int main(void) { */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
- while(TRUE) {
+ while (TRUE) {
if (SDU1.config->usbp->state == USB_ACTIVE) {
chnWrite(&SDU1, (const uint8_t *)"Hello World!\r\n", 14);
}
diff --git a/demos/AVR/RT-TEENSY2-USB/main.c b/demos/AVR/RT-TEENSY2-USB/main.c index 376751852..7944581c1 100644 --- a/demos/AVR/RT-TEENSY2-USB/main.c +++ b/demos/AVR/RT-TEENSY2-USB/main.c @@ -19,6 +19,9 @@ #include "shell.h" #include "usbcfg.h" +/* + * LED blinker thread, times are in milliseconds. + */ static THD_WORKING_AREA(waThread1, 128); static THD_FUNCTION(Thread1, arg) { (void)arg; diff --git a/demos/AVR/TEST-SUITE-OSLIB/main.c b/demos/AVR/TEST-SUITE-OSLIB/main.c index 28ce40563..e9b12e078 100644 --- a/demos/AVR/TEST-SUITE-OSLIB/main.c +++ b/demos/AVR/TEST-SUITE-OSLIB/main.c @@ -18,6 +18,9 @@ #include "hal.h"
#include "oslib_test_root.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -44,8 +47,6 @@ int main(void) { halInit();
chSysInit();
- palClearPad(IOPORT2, PORTB_LED1);
-
/*
* Activates the serial driver 1 using the driver default configuration.
*/
@@ -61,7 +62,7 @@ int main(void) { */
test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite);
- while(TRUE) {
+ while (TRUE) {
chThdSleepMilliseconds(1000);
}
}
diff --git a/demos/AVR/TEST-SUITE-RT/main.c b/demos/AVR/TEST-SUITE-RT/main.c index 079967943..a75ed1963 100644 --- a/demos/AVR/TEST-SUITE-RT/main.c +++ b/demos/AVR/TEST-SUITE-RT/main.c @@ -18,6 +18,9 @@ #include "hal.h"
#include "rt_test_root.h"
+/*
+ * LED blinker thread, times are in milliseconds.
+ */
static THD_WORKING_AREA(waThread1, 32);
static THD_FUNCTION(Thread1, arg) {
@@ -44,8 +47,6 @@ int main(void) { halInit();
chSysInit();
- palClearPad(IOPORT2, PORTB_LED1);
-
/*
* Activates the serial driver 1 using the driver default configuration.
*/
@@ -61,7 +62,7 @@ int main(void) { */
test_execute((BaseSequentialStream *)&SD1, &rt_test_suite);
- while(TRUE) {
+ while (TRUE) {
chThdSleepMilliseconds(1000);
}
}
|