X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Ftmirws%2FMotePlatformC.nc;h=39b45c96caa561d455733975abfcdc1557c819ce;hb=33953a2e344b09fcd13b3bc53a421da4c51336d7;hp=9f7504883ac87ea320ae97f805ea2bf4f0457971;hpb=136500fa756cec47339eb13963d429c7b4350146;p=tinyos-2.x.git diff --git a/tos/platforms/tmirws/MotePlatformC.nc b/tos/platforms/tmirws/MotePlatformC.nc index 9f750488..39b45c96 100644 --- a/tos/platforms/tmirws/MotePlatformC.nc +++ b/tos/platforms/tmirws/MotePlatformC.nc @@ -26,11 +26,11 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + /** * @author R. Steve McKown */ - + module MotePlatformC @safe() { provides interface Init; } @@ -39,19 +39,14 @@ implementation { /* reset all of the ports to be input and using i/o functionality */ atomic { -#ifdef __MSP430_HAS_WDT__ - /* Stop the watchdog, if running. Should be somewhere in chips/msp430... */ - WDTCTL = WDTPW + WDTHOLD; -#endif - /* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:RAIN, 4:-, 3:CP_CTS, 2:CP_RTS, * 1:BSL_TX, 0:WSPEED */ P1SEL = 0; /* 0 0 0 0 0 0 0 0 */ P1OUT = 0x10; /* 0 0 0 1 0 0 0 0 */ P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ - P1REN = 0x10; /* 0 0 0 1 0 0 0 0 */ - + P1REN = 0x14; /* 0 0 0 1 0 1 0 0 */ + /* Port 2: * 7:SHT_DATA, 6:SCP_DRDY, 5:BUTTONn, 4:USB_SUSPENDn, 3:GM_PWRMON, * 2:BSL_RX, 1:USBPGn, 0:SOLARPGn @@ -80,20 +75,21 @@ implementation { P4REN = 0x83; /* 1 0 0 0 0 0 1 1 */ /* Port 5: - * 7:W315, 6:W270, 5:W225, 4:W180, 3:W135, 2:W090, 1:W045, 0:W000 + * 7:WPOWER, 6:WDEAD, 5:-, 4:-, 3:-, 2:-, 1:-, 0:- */ P5SEL = 0; /* 0 0 0 0 0 0 0 0 */ - P5OUT = 0; /* 0 0 0 0 0 0 0 0 */ - P5DIR = 0; /* 0 0 0 0 0 0 0 0 */ - P5REN = 0; /* 0 0 0 0 0 0 0 0 */ + P5OUT = 0x3f; /* 0 0 1 1 1 1 1 1 */ + P5DIR = 0x80; /* 1 0 0 0 0 0 0 0 */ + P5REN = 0x3f; /* 0 0 1 1 1 1 1 1 */ /* Port 6: - * 7:TEMP_PWR, 6:TEMP3, 5:TEMP2, 4:TEMP1, 3:PHOTO, 2:-, 1:-, 0:ADC_VBATT + * 7:TEMP_PWR, 6:TEMP3, 5:TEMP2, 4:TEMP1, 3:PHOTO, 2:ADC_WIND, 1:-, + * 0:ADC_VBATT */ - P6SEL = 0x79; /* 0 1 1 1 1 0 0 1 */ + P6SEL = 0x7d; /* 0 1 1 1 1 1 0 1 */ P6OUT = 0; /* 0 0 0 0 0 0 0 0 */ P6DIR = 0x80; /* 1 0 0 0 0 0 0 0 */ - P6REN = 0x06; /* 0 0 0 0 0 1 1 0 */ + P6REN = 0x02; /* 0 0 0 0 0 0 1 0 */ P1IE = 0; P2IE = 0;