diff options
author | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-17 20:09:11 +0000 |
---|---|---|
committer | Glenn Humphrey <glenn.humphrey@oarcorp.com> | 2009-12-17 20:09:11 +0000 |
commit | c7ee08547586d127741ed426d0deac2d378ed9d8 (patch) | |
tree | 4e566d61e1469238ba5b19fc0bdbf6e6724db0d5 /led/timeout_event | |
parent | 2009-12-14 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-examples-c7ee08547586d127741ed426d0deac2d378ed9d8.tar.bz2 |
2009-12-17 Glenn Humphrey <glenn.humphrey@OARcorp.com>
* delay/init.c, event_server/init.c, msg_server/init.c,
posix_cond_server/test.c, posix_delay_nanosleep/test.c,
posix_delay_sleep/test.c, posix_mutex_server/test.c, ratemon1/init.c,
ratemon2/init.c, ratemon_cond_server/test.c, sem_server/init.c,
timeout_event/init.c: Cleaned up the led examples to produce similiar
output.
* timer_server/.cvsignore: New file.
Diffstat (limited to 'led/timeout_event')
-rw-r--r-- | led/timeout_event/init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/led/timeout_event/init.c b/led/timeout_event/init.c index ee9fc23..4f9ef63 100644 --- a/led/timeout_event/init.c +++ b/led/timeout_event/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2007. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -27,17 +27,17 @@ rtems_task Init( LED_INIT(); - while (1) { + for (count=0; ; count++) { status = rtems_event_receive( RTEMS_EVENT_1, RTEMS_DEFAULT_OPTIONS, rtems_clock_get_ticks_per_second(), &events ); if ( status != RTEMS_TIMEOUT ) fputs( "receive did not timeout\n", stderr ); - if ( (count++ % 2) == 0 ) - LED_ON(); - else + if ( (count % 2) == 0 ) LED_OFF(); + else + LED_ON(); } |