X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Ftmimsp%2Ftmirws%2Fchips%2Fsht11%2FOpenDrainP.nc;h=b993f224e0200833d41c1453d9bc127896ca6a70;hb=be862ab07d080085823951d18dcb27a28a310ace;hp=9cc2246297ebfbe6a30cf818dc0e5b0c8561c42a;hpb=18ef68f001622bfd913d4269bf191563a5be475c;p=tinyos-2.x.git diff --git a/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc b/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc index 9cc22462..b993f224 100644 --- a/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc +++ b/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc @@ -10,7 +10,7 @@ * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * - Neither the name of the Technische Universität Berlin nor the names + * - Neither the name of the Titanium Mirror, Inc. nor the names * of its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -28,14 +28,13 @@ */ /** - * Implement an open drain output using a GeneralIO, represented as a - * GeneralIO. clr() puts the pin in input mode, simulating open drain and - * therefore requiring a pull-up on the net. set() puts the pin in output - * mode and sinks current by outputting a logic zero. By definition, the - * pin wrapped by this component can only be used as an output. + * Provide an open drain output as a GeneralIO using a GeneralIO. set() puts + * the pin in high impedance state by selecting the pin input mode. clr() sets + * the pin to sink current to ground by selecting the pin output mode, logic + * zero. Generally, an external pull-up resistor will be used with an open + * drain output. * - * TODO: there could be a version of this component that uses the msp430's - * built-in pull-up resistor... + * This pin can only be an open drain output and cannot be reconfigured. * * @author R. Steve McKown */ @@ -81,17 +80,8 @@ implementation } async command void GeneralIO.makeInput() {} - async command void GeneralIO.makeOutput() {} - - async command bool GeneralIO.isInput() - { - return FALSE; - } - - async command bool GeneralIO.isOutput() - { - return TRUE; - } + async command bool GeneralIO.isInput() { return FALSE; } + async command bool GeneralIO.isOutput() { return TRUE; } }