drivers/can_virtual/led_virtual.c
author dejoigny
Wed, 17 May 2006 20:43:56 +0200
changeset 13 0e43acff2c96
parent 3 d9cf34cd6823
permissions -rw-r--r--
Modifs mineures.
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     1
/***************************************************************************/
3
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
     2
#include <data.h>
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     3
#include <led.h>
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     4
3
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
     5
void led_set_redgreen(CO_Data *d, unsigned char state)
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
     6
{
3
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
     7
        if (state & 0x01)
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
     8
                printf("\e[41m ERROR LED ON \e[m          ");
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
     9
        else
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
    10
                printf("\e[31m error led off \e[m         ");
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    11
3
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
    12
        if (state & 0x02)
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    13
                printf("\e[34;42m RUN LED ON \e[m\n");
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    14
        else
3
d9cf34cd6823 ADDED LED to TESTMASTERSLAVE. It looks nice!
oremeq
parents: 0
diff changeset
    15
                printf("\e[32m run led off \e[m\n");
0
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    16
}
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    17
4472ee7c6c3e Commit a new cvs repo.
etisserant
parents:
diff changeset
    18