AVR: Update demo.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12094 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
tfateba 2018-06-13 09:40:20 +00:00
parent faa3f10780
commit 70542995be
11 changed files with 13 additions and 10 deletions

View File

@ -70,7 +70,7 @@ int main(void) {
*/ */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while (TRUE) { while (true) {
if (SDU1.config->usbp->state == USB_ACTIVE) { if (SDU1.config->usbp->state == USB_ACTIVE) {
chnWrite(&SDU1, (const uint8_t *)"Hello from Arduino Leonardo!\r\n", 30); chnWrite(&SDU1, (const uint8_t *)"Hello from Arduino Leonardo!\r\n", 30);
} }

View File

@ -58,7 +58,7 @@ int main(void) {
*/ */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while(TRUE) { while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -57,7 +57,8 @@ int main(void) {
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14); chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
while(TRUE) {
while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -57,7 +57,8 @@ int main(void) {
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14); chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
while(TRUE) {
while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -58,7 +58,7 @@ int main(void) {
chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14); chnWrite(&SD1, (const uint8_t *)"Hello World!\r\n", 14);
while (TRUE) { while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -79,7 +79,7 @@ int main(void) {
*/ */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while (TRUE) { while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -53,7 +53,7 @@ int main(void) {
*/ */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while (TRUE) { while (true) {
chThdSleepMilliseconds(100); chThdSleepMilliseconds(100);
} }
} }

View File

@ -73,7 +73,7 @@ int main(void) {
*/ */
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while (TRUE) { while (true) {
if (SDU1.config->usbp->state == USB_ACTIVE) { if (SDU1.config->usbp->state == USB_ACTIVE) {
chnWrite(&SDU1, (const uint8_t *)"Hello World!\r\n", 14); chnWrite(&SDU1, (const uint8_t *)"Hello World!\r\n", 14);
} }

View File

@ -24,6 +24,7 @@
*/ */
static THD_WORKING_AREA(waThread1, 128); static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) { static THD_FUNCTION(Thread1, arg) {
(void)arg; (void)arg;
chRegSetThreadName("blinker"); chRegSetThreadName("blinker");
while (true) { while (true) {

View File

@ -62,7 +62,7 @@ int main(void) {
*/ */
test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite); test_execute((BaseSequentialStream *)&SD1, &oslib_test_suite);
while (TRUE) { while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

View File

@ -62,7 +62,7 @@ int main(void) {
*/ */
test_execute((BaseSequentialStream *)&SD1, &rt_test_suite); test_execute((BaseSequentialStream *)&SD1, &rt_test_suite);
while (TRUE) { while (true) {
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }