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/ratemon1 | |
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/ratemon1')
-rw-r--r-- | led/ratemon1/init.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/led/ratemon1/init.c b/led/ratemon1/init.c index 1df7a59..83e48f4 100644 --- a/led/ratemon1/init.c +++ b/led/ratemon1/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 @@ -32,15 +32,14 @@ rtems_task Init( &period_id ); - count = 0; ticks = rtems_clock_get_ticks_per_second(); - while (1) { + for (count=0; ; count++) { status = rtems_rate_monotonic_period( period_id, ticks ); - if ( (++count % 2) == 0 ) - LED_ON(); - else + if ( (count % 2) == 0 ) LED_OFF(); + else + LED_ON(); } status = rtems_task_delete( RTEMS_SELF ); |