[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/atm128 McuSleepC.nc, 1.7, 1.8

Phil Levis scipio at users.sourceforge.net
Sat Apr 7 18:17:14 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20020

Modified Files:
	McuSleepC.nc 
Log Message:
Include I2C in sleep calculation, and base SPI off of SPE, not SPIE;
it may be enabled but not with interrupts. It would be a weird use case,
but it is possible.


Index: McuSleepC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/atm128/McuSleepC.nc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** McuSleepC.nc	14 Dec 2006 01:24:48 -0000	1.7
--- McuSleepC.nc	8 Apr 2007 01:17:12 -0000	1.8
***************
*** 75,86 ****
      }
      // SPI (Radio stack on mica/micaZ
!     else if (bit_is_set(SPCR, SPIE)) { 
        return ATM128_POWER_IDLE;
      }
!     // UARTs are active
!     else if (UCSR0B & (1 << TXCIE | 1 << RXCIE)) { // UART
        return ATM128_POWER_IDLE;
      }
!     else if (UCSR1B & (1 << TXCIE | 1 << RXCIE)) { // UART
        return ATM128_POWER_IDLE;
      }
--- 75,87 ----
      }
      // SPI (Radio stack on mica/micaZ
!     else if (bit_is_set(SPCR, SPE)) { 
        return ATM128_POWER_IDLE;
      }
!     // A UART is active
!     else if ((UCSR0B | UCSR1B) & (1 << TXCIE | 1 << RXCIE)) { // UART
        return ATM128_POWER_IDLE;
      }
!     // I2C (Two-wire) is active
!     else if (bit_is_set(TWCR, TWEN)){
        return ATM128_POWER_IDLE;
      }



More information about the Tinyos-2-commits mailing list