From 2a78cd143e2b762edb20469c12b3c0500f63df61 Mon Sep 17 00:00:00 2001 From: smckown Date: Thu, 11 Sep 2008 22:43:43 +0000 Subject: [PATCH] Modify initial tmirws platform code. --- tos/platforms/tmirws/.platform | 1 + tos/platforms/tmirws/MotePlatformC.nc | 40 +++++++++++++-------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/tos/platforms/tmirws/.platform b/tos/platforms/tmirws/.platform index f80694a5..be7e9235 100755 --- a/tos/platforms/tmirws/.platform +++ b/tos/platforms/tmirws/.platform @@ -4,6 +4,7 @@ # by ncc. push( @includes, qw( + %T/platforms/tmirws %T/platforms/tmicore %T/platforms/tmicore/chips/bq2403x %T/platforms/tmicore/chips/cp210x diff --git a/tos/platforms/tmirws/MotePlatformC.nc b/tos/platforms/tmirws/MotePlatformC.nc index bdf8d366..7f360f2c 100644 --- a/tos/platforms/tmirws/MotePlatformC.nc +++ b/tos/platforms/tmirws/MotePlatformC.nc @@ -44,43 +44,43 @@ implementation { WDTCTL = WDTPW + WDTHOLD; #endif - /* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:-, 4:-, 3:CP_CTS, 2:CP_RTS, 1:BSL_TX, 0:- */ + /* 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 = 0x39; /* 0 0 1 1 1 0 0 1 */ + P1OUT = 0x18; /* 0 0 0 1 1 0 0 0 */ P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ - P1REN = 0x31; /* 0 0 1 1 0 0 0 1 */ + P1REN = 0x10; /* 0 0 0 1 0 0 0 0 */ /* Port 2: - * 7:-, 6:-, 5:BUTTONn, 4:USB_SUSPENDn, 3:-, 2:BSL_RX, 1:USBPGn, 0:SOLARPGn + * 7:SHT_DATA, 6:SCP_DRDY, 5:BUTTONn, 4:USB_SUSPENDn, 3:-, 2:BSL_RX, 1:USBPGn, 0:SOLARPGn */ P2SEL = 0; /* 0 0 0 0 0 0 0 0 */ - P2OUT = 0xc8; /* 1 1 0 0 1 0 0 0 */ + P2OUT = 0x08; /* 0 0 0 0 1 0 0 0 */ P2DIR = 0x00; /* 0 0 0 0 0 0 0 0 */ - P2REN = 0xc8; /* 1 1 0 0 1 0 0 0 */ + P2REN = 0x08; /* 0 0 0 0 1 0 0 0 */ - /* Port 3: 7:UC_RX, 6:UC_TX, 5:-, 4:-, 3:UC_SCK, 2:UC_SOMI, 1:UC_SIMO, 0:- */ - P3SEL = 0xce; /* 1 1 0 0 1 1 1 0 */ + /* Port 3: 7:UC_RX, 6:UC_TX, 5:-, 4:-, 3:UC_SCK, 2:UC_SOMI, 1:UC_SIMO, 0:SHT_SCK */ + P3SEL = 0xc7; /* 1 1 0 0 1 1 1 0 */ P3OUT = 0x7b; /* 0 1 1 1 1 0 1 1 */ - P3DIR = 0x4a; /* 0 1 0 0 1 0 1 0 */ - P3REN = 0x31; /* 0 0 1 1 0 0 0 1 */ + P3DIR = 0x4b; /* 0 1 0 0 1 0 1 1 */ + P3REN = 0x30; /* 0 0 1 1 0 0 0 0 */ - /* Port 4: 7:-, 6:LED2n, 5:LED1n, 4:-, 3:-, 2:-, 1:-, 0:- */ + /* Port 4: 7:-, 6:LED2n, 5:LED1n, 4:FLH_CSn, 3:SCP_CSn, 2:SCP_PD, 1:-, 0:- */ P4SEL = 0; /* 0 0 0 0 0 0 0 0 */ P4OUT = 0xff; /* 1 1 1 1 1 1 1 1 */ - P4DIR = 0x60; /* 0 1 1 0 0 0 0 0 */ - P4REN = 0x9f; /* 1 0 0 1 1 1 1 1 */ + P4DIR = 0x7c; /* 0 1 1 1 1 1 0 0 */ + P4REN = 0x83; /* 1 0 0 0 0 0 1 1 */ - /* Port 5: 7:-, 6:-, 5:-, 4:-, 3:-, 2:-, 1:-, 0:- */ + /* Port 5: 7:W315, 6:W270, 5:W225, 4:W180, 3:W135, 2:W090, 1:W045, 0:W000 */ P5SEL = 0; /* 0 0 0 0 0 0 0 0 */ - P5OUT = 0xff; /* 1 1 1 1 1 1 1 1 */ + P5OUT = 0; /* 0 0 0 0 0 0 0 0 */ P5DIR = 0; /* 0 0 0 0 0 0 0 0 */ - P5REN = 0xff; /* 1 1 1 1 1 1 1 1 */ + P5REN = 0; /* 0 0 0 0 0 0 0 0 */ - /* Port 6: 7:-, 6:-, 5:-, 4:-, 3:-, 2:-, 1:-, 0:ADC_VBATT */ - P6SEL = 0x01; /* 0 0 0 0 0 0 0 1 */ + /* Port 6: 7:TEMP_PWR, 6:TEMP3, 5:TEMP2, 4:TEMP1, 3:PHOTO, 2:-, 1:-, 0:ADC_VBATT */ + P6SEL = 0x79; /* 0 1 1 1 1 0 0 1 */ P6OUT = 0; /* 0 0 0 0 0 0 0 0 */ - P6DIR = 0; /* 0 0 0 0 0 0 0 0 */ - P6REN = 0xff; /* 1 1 1 1 1 1 1 1 */ + P6DIR = 0x80; /* 1 0 0 0 0 0 0 0 */ + P6REN = 0x06; /* 0 0 0 0 0 1 1 0 */ P1IE = 0; P2IE = 0; -- 2.39.2