*/
/**
- * 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 <rsmckown@gmail.com>
*/
}
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; }
}