From: sallai Date: Wed, 4 Feb 2009 19:31:43 +0000 (+0000) Subject: make the check for uart status a bit more smarter X-Git-Tag: rc_6_tinyos_2_1_1~507 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=0c6dbc97b14adc3655f827c9e5a00bbd54e00f3b make the check for uart status a bit more smarter --- diff --git a/tos/chips/atm1281/McuSleepC.nc b/tos/chips/atm1281/McuSleepC.nc index 19b8738c..65f1389c 100644 --- a/tos/chips/atm1281/McuSleepC.nc +++ b/tos/chips/atm1281/McuSleepC.nc @@ -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