From 35c068bddde37b47eb3965571b5c9f3b5d328cb1 Mon Sep 17 00:00:00 2001 From: smckown Date: Thu, 30 Apr 2009 13:58:20 +0000 Subject: [PATCH] Remove the NO_REN_ON_SPI define. Per the TI datasheet, PxREN bits shouldn't be set at the same time as the corresponding PxSEL (module function) bits as unintended current consumption could be triggered. --- tos/chips/msp430/usci/Msp430SpiP.nc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tos/chips/msp430/usci/Msp430SpiP.nc b/tos/chips/msp430/usci/Msp430SpiP.nc index dad8e824..9f3fd177 100644 --- a/tos/chips/msp430/usci/Msp430SpiP.nc +++ b/tos/chips/msp430/usci/Msp430SpiP.nc @@ -32,8 +32,6 @@ * * TODO: Implement error checking via UCxxSTAT * - * NOTE: Define NO_REN_ON_SPI to disable PxREN bits when SPI is acquired. - * * @author R. Steve McKown */ @@ -63,9 +61,7 @@ implementation { PINS_SOMI, PINS_SIMO, PINS_CLK, -#ifdef NO_REN_ON_SPI PINS_RENADDR, /* This gets added to store the PxREN bit */ -#endif }; uint8_t m_pins; @@ -112,7 +108,6 @@ implementation { /* Configure pins for SPI, saving prior pin states */ m_pins = 0; -#ifdef NO_REN_ON_SPI /* - First save off and disable PxREN bits */ if (is4pin() && call STE.isRen()) { m_pins |= (1 << (PINS_STE + PINS_RENADDR)); @@ -130,7 +125,6 @@ implementation { m_pins |= (1 << (PINS_CLK + PINS_RENADDR)); call CLK.disableRen(); } -#endif /* - Then save off IOFunc state and enable ModuleFunc */ if (is4pin() && call STE.isIOFunc()) { m_pins |= (1 << PINS_STE); @@ -179,7 +173,6 @@ implementation { if (m_pins & (1 << PINS_CLK)) call CLK.selectIOFunc(); /* - Then restore PxREN bits */ -#ifdef NO_REN_ON_SPI if (is4pin() && (m_pins & (1 << (PINS_STE + PINS_RENADDR)))) call STE.enableRen(); if (m_pins & (1 << (PINS_SIMO + PINS_RENADDR))) @@ -188,7 +181,6 @@ implementation { call SOMI.enableRen(); if (m_pins & (1 << (PINS_CLK + PINS_RENADDR))) call CLK.enableRen(); -#endif } } -- 2.39.2