From: smckown Date: Wed, 1 Apr 2009 22:34:06 +0000 (+0000) Subject: Fix up io pin restoration after SPI peripheral is released. X-Git-Tag: release/2.1.0-1~19 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=a89cc4ae698121d6a98b0e8e8c06cfe2bcaf6b8a Fix up io pin restoration after SPI peripheral is released. --- diff --git a/tos/chips/msp430/usci/Msp430SpiP.nc b/tos/chips/msp430/usci/Msp430SpiP.nc index dfdf5afd..1f9701cc 100644 --- a/tos/chips/msp430/usci/Msp430SpiP.nc +++ b/tos/chips/msp430/usci/Msp430SpiP.nc @@ -144,13 +144,13 @@ implementation { call Registers.clrIfgRx(); /* Restore pins to their pre-configure state */ - if (is4pin() && (m_pins & PINS_STE)) + if (is4pin() && (m_pins & (1 << PINS_STE))) call STE.selectIOFunc(); - if (m_pins & PINS_SIMO) + if (m_pins & (1 << PINS_SIMO)) call SIMO.selectIOFunc(); - if (m_pins & PINS_SOMI) + if (m_pins & (1 << PINS_SOMI)) call SOMI.selectIOFunc(); - if (m_pins & PINS_CLK) + if (m_pins & (1 << PINS_CLK)) call CLK.selectIOFunc(); } }