From: smckown Date: Tue, 16 Sep 2008 14:25:18 +0000 (+0000) Subject: Don't leave the iopin attached to the sht1x SCK pin floating when the X-Git-Tag: release/2.1.0-1~36 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=de1f4d3e971a6d7c6cb79ac9ffce01822f48f0f2 Don't leave the iopin attached to the sht1x SCK pin floating when the controlling Resource is released. Also, set the DATA pin in a manner consistent with the fact that it is a pulled-up line by default, either via an external resistor or one internal to the uC. --- diff --git a/tos/platforms/tmirws/chips/sht11/HplSensirionSht11P.nc b/tos/platforms/tmirws/chips/sht11/HplSensirionSht11P.nc index 45b30ec9..777891f3 100644 --- a/tos/platforms/tmirws/chips/sht11/HplSensirionSht11P.nc +++ b/tos/platforms/tmirws/chips/sht11/HplSensirionSht11P.nc @@ -61,17 +61,10 @@ implementation { } command error_t SplitControl.stop() { -#if 0 - call SCK.makeInput(); + call SCK.makeOutput(); call SCK.clr(); call DATA.makeInput(); - call DATA.clr(); -#else - call DATA.makeOutput(); - call SCK.clr(); /* remains an output so no floating pin */ - call DATA.makeOutput(); - call DATA.set(); /* set as pulled-up output so we see no interrupts */ -#endif + call DATA.set(); call PWR.clr(); post stopTask(); return SUCCESS;