From: R. Steve McKown Date: Mon, 27 Sep 2010 18:21:51 +0000 (-0600) Subject: Fix up io pin restoration after Uart peripheral is released. X-Git-Tag: release/2.1.1-4.4 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=2d252cfb688eee6ff8aa13bef1efb1627cb866f8 Fix up io pin restoration after Uart peripheral is released. --- diff --git a/tos/chips/msp430/usci/Msp430UartP.nc b/tos/chips/msp430/usci/Msp430UartP.nc index cb8073df..605c4269 100644 --- a/tos/chips/msp430/usci/Msp430UartP.nc +++ b/tos/chips/msp430/usci/Msp430UartP.nc @@ -55,7 +55,7 @@ generic module Msp430UartP() { implementation { enum { /* Bit positions in m_pins */ - PINS_RXD = 1, + PINS_RXD = 0, PINS_TXD }; @@ -137,9 +137,9 @@ implementation { m_sobuf = 0; /* Restore pins to their pre-configure state */ - if (m_pins & PINS_RXD) + if (m_pins & (1 << PINS_RXD)) call RXD.selectIOFunc(); - if (m_pins & PINS_TXD) + if (m_pins & (1 << PINS_TXD)) call TXD.selectIOFunc(); } }