X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fplatforms%2Ftmimsp%2Ftmirws%2Fchips%2Fsht11%2FOpenDrainP.nc;h=4a8fa075e51ddd14df0402a1718fd0d1e577efc0;hp=9cc2246297ebfbe6a30cf818dc0e5b0c8561c42a;hb=3aed39b6730a55e41c9ae5a8a1e690bca5746147;hpb=d8e1736a3c545ce99fa33abe443d1cc34638ee5e diff --git a/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc b/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc index 9cc22462..4a8fa075 100644 --- a/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc +++ b/tos/platforms/tmimsp/tmirws/chips/sht11/OpenDrainP.nc @@ -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; } }