X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Ftmirws%2FMotePlatformC.nc;h=41643345788174202cc502f5e5e2e24d84fba144;hb=cffaafb54dc15ecad07b1786c1a6d3865cd16a56;hp=e79701a3523979c15b168a3551b7f3a97445b6a3;hpb=38d2b17aa6238ebde53333acf9f51c940b8e5f91;p=tinyos-2.x.git diff --git a/tos/platforms/tmirws/MotePlatformC.nc b/tos/platforms/tmirws/MotePlatformC.nc index e79701a3..41643345 100644 --- a/tos/platforms/tmirws/MotePlatformC.nc +++ b/tos/platforms/tmirws/MotePlatformC.nc @@ -45,10 +45,17 @@ implementation { #endif /* Port 1: 7:BQSTAT2, 6:BQSTAT1, 5:RAIN, 4:-, 3:CP_CTS, 2:CP_RTS, 1:BSL_TX, 0:WSPEED */ +#if 0 /* no rain/wind yet */ P1SEL = 0; /* 0 0 0 0 0 0 0 0 */ P1OUT = 0x18; /* 0 0 0 1 1 0 0 0 */ P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ P1REN = 0x10; /* 0 0 0 1 0 0 0 0 */ +#else + P1SEL = 0; /* 0 0 0 0 0 0 0 0 */ + P1OUT = 0x39; /* 0 0 1 1 1 0 0 1 */ + P1DIR = 0x08; /* 0 0 0 0 1 0 0 0 */ + P1REN = 0x31; /* 0 0 1 1 0 0 0 1 */ +#endif /* Port 2: * 7:SHT_DATA, 6:SCP_DRDY, 5:BUTTONn, 4:USB_SUSPENDn, 3:-, 2:BSL_RX, 1:USBPGn, 0:SOLARPGn @@ -59,10 +66,17 @@ implementation { 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:SHT_SCK */ +#if 0 /* no sht yet */ P3SEL = 0; /* 0 0 0 0 0 0 0 0 */ P3OUT = 0xff; /* 1 1 1 1 1 1 1 1 */ P3DIR = 0x4b; /* 0 1 0 0 1 0 1 1 */ P3REN = 0xb4; /* 1 0 1 1 0 1 0 0 */ +#else + P3SEL = 0; /* 0 0 0 0 0 0 0 0 */ + P3OUT = 0xff; /* 1 1 1 1 1 1 1 1 */ + P3DIR = 0x4a; /* 0 1 0 0 1 0 1 0 */ + P3REN = 0xb5; /* 1 0 1 1 0 1 0 1 */ +#endif /* 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 */ @@ -71,16 +85,31 @@ 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 */ +#if 0 /* no wind yet */ 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 */ +#else + /* Port 5: 7:-, 6:-, 5:-, 4:-, 3:-, 2:-, 1:-, 0:- */ + P5SEL = 0; /* 0 0 0 0 0 0 0 0 */ + P5OUT = 0xff; /* 1 1 1 1 1 1 1 1 */ + P5DIR = 0; /* 0 0 0 0 0 0 0 0 */ + P5REN = 0xff; /* 1 1 1 1 1 1 1 1 */ +#endif /* Port 6: 7:TEMP_PWR, 6:TEMP3, 5:TEMP2, 4:TEMP1, 3:PHOTO, 2:-, 1:-, 0:ADC_VBATT */ +#if 0 /* no photo or temps yet */ P6SEL = 0x79; /* 0 1 1 1 1 0 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 */ +#else + P6SEL = 0x01; /* 0 0 0 0 0 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 */ +#endif P1IE = 0; P2IE = 0;