diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-11-15 10:34:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-11-15 10:34:35 +0000 |
commit | 554e9da84ac99455e812d366418dc508eb51f09d (patch) | |
tree | a7bc14bb6bb21643d7e46408261b749f0ab5ea75 /demos | |
parent | ae97c97b114c0e56d9881d54fbc97a052976b25a (diff) | |
download | ChibiOS-554e9da84ac99455e812d366418dc508eb51f09d.tar.gz ChibiOS-554e9da84ac99455e812d366418dc508eb51f09d.tar.bz2 ChibiOS-554e9da84ac99455e812d366418dc508eb51f09d.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@511 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-AT91SAM7X-GCC/main.c | 6 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/main.c | 6 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-GCC-minimal/main.c | 14 | ||||
-rw-r--r-- | demos/AVR-AT90CANx-GCC/main.c | 6 | ||||
-rw-r--r-- | demos/AVR-ATmega128-GCC/main.c | 6 | ||||
-rw-r--r-- | demos/MSP430-MSP430x1611-GCC/main.c | 6 |
6 files changed, 22 insertions, 22 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c index 1fc284cd3..1d60db848 100644 --- a/demos/ARM7-AT91SAM7X-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-GCC/main.c @@ -28,9 +28,9 @@ static msg_t Thread1(void *arg) { while (TRUE) {
AT91C_BASE_PIOB->PIO_SODR = PIOB_LCD_BL; // LCD on.
- chThdSleep(100);
+ chThdSleepMilliseconds(100);
AT91C_BASE_PIOB->PIO_CODR = PIOB_LCD_BL; // LCD off.
- chThdSleep(900);
+ chThdSleepMilliseconds(900);
}
return 0;
}
@@ -50,7 +50,7 @@ int main(int argc, char **argv) { * Normal main() thread activity.
*/
while (TRUE) {
- chThdSleep(500);
+ chThdSleepMilliseconds(500);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW1))
chFDDWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW2))
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c index 00dc9193e..a3da190d7 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c @@ -33,9 +33,9 @@ static msg_t Thread1(void *arg) { while (TRUE) {
AT91C_BASE_PIOB->PIO_SODR = PIOB_LCD_BL; // LCD on.
- chThdSleep(100);
+ chThdSleepMilliseconds(100);
AT91C_BASE_PIOB->PIO_CODR = PIOB_LCD_BL; // LCD off.
- chThdSleep(900);
+ chThdSleepMilliseconds(900);
}
return 0;
}
@@ -56,7 +56,7 @@ int main(int argc, char **argv) { * Normal main() thread activity.
*/
while (TRUE) {
- chThdSleep(500);
+ chThdSleepMilliseconds(500);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW1))
chFDDWrite(&COM1, (uint8_t *)"Hello World!\r\n", 14);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW2))
diff --git a/demos/ARM7-LPC214x-GCC-minimal/main.c b/demos/ARM7-LPC214x-GCC-minimal/main.c index 11fdd7b56..134d74f5d 100644 --- a/demos/ARM7-LPC214x-GCC-minimal/main.c +++ b/demos/ARM7-LPC214x-GCC-minimal/main.c @@ -29,13 +29,13 @@ static msg_t Thread1(void *arg) { while (TRUE) {
IO0CLR = 0x00000800;
- chThdSleep(200);
+ chThdSleepMilliseconds(200);
IO0SET = 0x00000C00;
- chThdSleep(800);
+ chThdSleepMilliseconds(800);
IO0CLR = 0x00000400;
- chThdSleep(200);
+ chThdSleepMilliseconds(200);
IO0SET = 0x00000C00;
- chThdSleep(800);
+ chThdSleepMilliseconds(800);
}
return 0;
}
@@ -48,9 +48,9 @@ static msg_t Thread2(void *arg) { while (TRUE) {
IO0CLR = 0x80000000;
- chThdSleep(200);
+ chThdSleepMilliseconds(200);
IO0SET = 0x80000000;
- chThdSleep(300);
+ chThdSleepMilliseconds(300);
}
return 0;
}
@@ -72,6 +72,6 @@ int main(int argc, char **argv) { * sleeping in a loop.
*/
while (TRUE)
- chThdSleep(1000);
+ chThdSleepMilliseconds(1000);
return 0;
}
diff --git a/demos/AVR-AT90CANx-GCC/main.c b/demos/AVR-AT90CANx-GCC/main.c index 987deb072..b7e646c6b 100644 --- a/demos/AVR-AT90CANx-GCC/main.c +++ b/demos/AVR-AT90CANx-GCC/main.c @@ -32,7 +32,7 @@ static msg_t Thread1(void *arg) { while (TRUE) {
PORTE ^= PORTE_LED;
- chThdSleep(500);
+ chThdSleepMilliseconds(500);
}
return 0;
}
@@ -62,7 +62,7 @@ int main(int argc, char **argv) { /*
* Event Timer initialization.
*/
- evtInit(&evt, 500); /* Initializes an event timer object. */
+ evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */
evtStart(&evt); /* Starts the event timer. */
chEvtRegister(&evt.et_es, &el0, 0); /* Registers on the timer event source. */
@@ -72,7 +72,7 @@ int main(int argc, char **argv) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while(TRUE)
- chEvtWait(ALL_EVENTS, handlers);
+ chEvtDispatch(handlers, chEvtWaitOne(ALL_EVENTS));
return 0;
}
diff --git a/demos/AVR-ATmega128-GCC/main.c b/demos/AVR-ATmega128-GCC/main.c index 873a28a79..40b2f8b89 100644 --- a/demos/AVR-ATmega128-GCC/main.c +++ b/demos/AVR-ATmega128-GCC/main.c @@ -34,7 +34,7 @@ static msg_t Thread1(void *arg) { while (TRUE) {
if (!(PINA & PORTA_BUTTON2))
PORTA ^= PORTA_RELAY;
- chThdSleep(1000);
+ chThdSleepMilliseconds(1000);
}
return 0;
}
@@ -73,7 +73,7 @@ int main(int argc, char **argv) { /*
* Event Timer initialization.
*/
- evtInit(&evt, 500); /* Initializes an event timer object. */
+ evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */
evtStart(&evt); /* Starts the event timer. */
chEvtRegister(&evt.et_es, &el0, 0); /* Registers on the timer event source. */
@@ -83,7 +83,7 @@ int main(int argc, char **argv) { chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
while(TRUE)
- chEvtWait(ALL_EVENTS, handlers);
+ chEvtDispatch(handlers, chEvtWaitOne(ALL_EVENTS));
return 0;
}
diff --git a/demos/MSP430-MSP430x1611-GCC/main.c b/demos/MSP430-MSP430x1611-GCC/main.c index 72025d6a4..911ba84d9 100644 --- a/demos/MSP430-MSP430x1611-GCC/main.c +++ b/demos/MSP430-MSP430x1611-GCC/main.c @@ -31,9 +31,9 @@ static msg_t Thread1(void *arg) { while (TRUE) {
P6OUT |= P6_O_LED;
- chThdSleep(MS2ST(500));
+ chThdSleepMilliseconds(500);
P6OUT &= ~P6_O_LED;
- chThdSleep(MS2ST(500));
+ chThdSleepMilliseconds(500);
}
return 0;
}
@@ -66,7 +66,7 @@ int main(int argc, char **argv) { while (TRUE) {
if (!(P6IN & P6_I_BUTTON))
TestThread(&COM1);
- chThdSleep(MS2ST(500));
+ chThdSleepMilliseconds(500);
}
return 0;
}
|