From 55281989292c9473d1541f29e47e50e8df084b5f Mon Sep 17 00:00:00 2001 From: nifi Date: Mon, 9 Oct 2006 14:38:23 +0000 Subject: [PATCH] fixed leds invert --- core/dev/leds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/dev/leds.c b/core/dev/leds.c index 97557cd7f..b18eccb89 100644 --- a/core/dev/leds.c +++ b/core/dev/leds.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: leds.c,v 1.2 2006/10/09 11:55:02 adamdunkels Exp $ + * @(#)$Id: leds.c,v 1.3 2006/10/09 14:38:23 nifi Exp $ */ #include "dev/leds.h" @@ -39,7 +39,7 @@ static unsigned char leds, invert; static void show_leds(void) { - leds_arch_set(leds); + leds_arch_set(leds ^ invert); } /*---------------------------------------------------------------------------*/ void @@ -87,7 +87,7 @@ leds_toggle(unsigned char leds) /* invert the ínvert register using the leds parameter */ void leds_invert(unsigned char l) { - leds = ~leds; + invert = invert ^ l; show_leds(); }