From 0c6dbc97b14adc3655f827c9e5a00bbd54e00f3b Mon Sep 17 00:00:00 2001 From: sallai Date: Wed, 4 Feb 2009 19:31:43 +0000 Subject: [PATCH] make the check for uart status a bit more smarter --- tos/chips/atm1281/McuSleepC.nc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2