]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
make the check for uart status a bit more smarter
authorsallai <sallai>
Wed, 4 Feb 2009 19:31:43 +0000 (19:31 +0000)
committersallai <sallai>
Wed, 4 Feb 2009 19:31:43 +0000 (19:31 +0000)
tos/chips/atm1281/McuSleepC.nc

index 19b8738cb868ec21cae440ec2d205b1ae25fe762..65f1389c334dab50047b057bd72db380d4e1f444 100644 (file)
@@ -106,10 +106,10 @@ implementation {
       return ATM128_POWER_IDLE;
     }
     // UARTs are active
-    else if (UCSR0B & (1 << TXCIE0 | 1 << RXCIE0)) { // UART
+    else if (UCSR0B & (1 << TXCIE0 | 1 << RXCIE0 | 1 << UDRIE0)) { // UART
       return ATM128_POWER_IDLE;
     }
-    else if (UCSR1B & (1 << TXCIE1 | 1 << RXCIE1)) { // UART
+    else if (UCSR1B & (1 << TXCIE1 | 1 << RXCIE1 | 1 << UDRIE1)) { // UART
       return ATM128_POWER_IDLE;
     }
     // I2C (Two-wire) is active