drivers/can_virtual/led_virtual.c
changeset 3 d9cf34cd6823
parent 0 4472ee7c6c3e
--- a/drivers/can_virtual/led_virtual.c	Thu May 11 13:52:43 2006 +0200
+++ b/drivers/can_virtual/led_virtual.c	Fri May 12 22:14:03 2006 +0200
@@ -1,20 +1,18 @@
 /***************************************************************************/
+#include <data.h>
 #include <led.h>
 
-void led_set_redgreen(CO_Data *d, int state)
+void led_set_redgreen(CO_Data *d, unsigned char state)
 {
+        if (state & 0x01)
+                printf("\e[41m ERROR LED ON \e[m          ");
+        else
+                printf("\e[31m error led off \e[m         ");
 
-        printf("LEDS %d\n",bits);
-
-        if (bits & 0x01)
-                printf("\e[41m ERROR LED ON \e[m\n");
-        else
-                printf("error led off\n");
-
-        if (bits & 0x02)
+        if (state & 0x02)
                 printf("\e[34;42m RUN LED ON \e[m\n");
         else
-                printf("run led off\n");
+                printf("\e[32m run led off \e[m\n");
 }