From de1f4d3e971a6d7c6cb79ac9ffce01822f48f0f2 Mon Sep 17 00:00:00 2001 From: smckown Date: Tue, 16 Sep 2008 14:25:18 +0000 Subject: [PATCH] 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. --- .../tmirws/chips/sht11/HplSensirionSht11P.nc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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; -- 2.39.2