[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/handhelds/tos/platform/shimmer LedsC.nc, 1.1, 1.2

steve ayer ayer1 at users.sourceforge.net
Sun Feb 25 12:12:25 PST 2007


Update of /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/shimmer
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv24848

Modified Files:
	LedsC.nc 
Log Message:

addition of orange led broken; fix provided by jason waterman.

Index: LedsC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/handhelds/tos/platform/shimmer/LedsC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LedsC.nc	3 Aug 2006 19:16:50 -0000	1.1
--- LedsC.nc	25 Feb 2007 20:12:22 -0000	1.2
***************
*** 52,58 ****
    enum {
      RED_BIT = 1,
!     YELLOW_BIT = 2,
!     ORANGE_BIT = 3,
!     GREEN_BIT = 4
    };
  
--- 52,58 ----
    enum {
      RED_BIT = 1,
!     ORANGE_BIT = 2,
!     YELLOW_BIT = 4,
!     GREEN_BIT = 8
    };
  
***************
*** 125,129 ****
      }
      return rval;
- 
    }
  
--- 125,128 ----
***************
*** 195,199 ****
    async command result_t Leds.set(uint8_t ledsNum) {
      atomic {
!       ledsOn = (ledsNum & 0x7);
        if (ledsOn & RED_BIT) 
  	TOSH_CLR_RED_LED_PIN();
--- 194,198 ----
    async command result_t Leds.set(uint8_t ledsNum) {
      atomic {
!       ledsOn = (ledsNum & 0xF);
        if (ledsOn & RED_BIT) 
  	TOSH_CLR_RED_LED_PIN();
***************
*** 204,208 ****
        else 
  	TOSH_SET_YELLOW_LED_PIN();
!     }
      return SUCCESS;
    }
--- 203,215 ----
        else 
  	TOSH_SET_YELLOW_LED_PIN();
!       if (ledsOn & GREEN_BIT ) 
! 	TOSH_CLR_GREEN_LED_PIN();
!       else 
! 	TOSH_SET_GREEN_LED_PIN();
!       if (ledsOn & ORANGE_BIT ) 
! 	TOSH_CLR_ORANGE_LED_PIN();
!       else 
! 	TOSH_SET_ORANGE_LED_PIN();
!   }
      return SUCCESS;
    }



More information about the Tinyos-contrib-commits mailing list