Changeset c7ee085 in examples-v2 for led/event_server/init.c


Ignore:
Timestamp:
Dec 17, 2009, 8:09:11 PM (10 years ago)
Author:
Glenn Humphrey <glenn.humphrey@…>
Branches:
4.11, examples-v2-4-10-branch, 286403d7a3d0e521179e677c0d2fd7549c9ceab4
Children:
a3bf3ec
Parents:
22c7774
Message:

2009-12-17 Glenn Humphrey <glenn.humphrey@…>

  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • led/event_server/init.c

    r22c7774 rc7ee085  
    11/*
    2  *  COPYRIGHT (c) 1989-2007.
     2 *  COPYRIGHT (c) 1989-2009.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    3333
    3434    if ( events == RTEMS_EVENT_1 ) {
     35      LED_OFF();
     36    } else if ( events == RTEMS_EVENT_2 ) {
    3537      LED_ON();
    36     } else if ( events == RTEMS_EVENT_2 ) {
    37       LED_OFF();
    3838    } else {
    3939      fprintf( stderr, "Incorrect event set 0x%08" PRIx32 "\n", events );
     
    6666  status = rtems_task_start( task_id, Test_task, 1 );
    6767
    68   while (1) {
     68  for (count=0; ; count++) {
    6969
    70     events = ( (count++ % 2) == 0 ) ?  RTEMS_EVENT_1 : RTEMS_EVENT_2;
     70    events = ( (count % 2) == 0 ) ?  RTEMS_EVENT_1 : RTEMS_EVENT_2;
    7171    status = rtems_event_send( task_id, events );
    7272    if ( status != RTEMS_SUCCESSFUL )
Note: See TracChangeset for help on using the changeset viewer.