From 2d252cfb688eee6ff8aa13bef1efb1627cb866f8 Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Mon, 27 Sep 2010 12:21:51 -0600 Subject: [PATCH] Fix up io pin restoration after Uart peripheral is released. --- tos/chips/msp430/usci/Msp430UartP.nc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); } } -- 2.39.2