ads1115 only
Fork of mbed by
Diff: DigitalOut.h
- Revision:
- 55:d722ed6a4237
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
--- a/DigitalOut.h Tue Jan 08 12:46:36 2013 +0000 +++ b/DigitalOut.h Wed Jan 16 12:56:34 2013 +0000 @@ -33,9 +33,9 @@ * @code * // Toggle a LED * #include "mbed.h" - * + * * DigitalOut led(LED1); - * + * * int main() { * while(1) { * led = !led; @@ -54,26 +54,26 @@ DigitalOut(PinName pin) { gpio_init(&gpio, pin, PIN_OUTPUT); } - + /** Set the output, specified as 0 or 1 (int) * - * @param value An integer specifying the pin output value, - * 0 for logical 0, 1 (or any other non-zero value) for logical 1 + * @param value An integer specifying the pin output value, + * 0 for logical 0, 1 (or any other non-zero value) for logical 1 */ void write(int value) { gpio_write(&gpio, value); } - + /** Return the output setting, represented as 0 or 1 (int) * * @returns - * an integer representing the output setting of the pin, + * an integer representing the output setting of the pin, * 0 for logical 0, 1 for logical 1 */ int read() { return gpio_read(&gpio); } - + #ifdef MBED_OPERATORS /** A shorthand for write() */ @@ -81,12 +81,12 @@ write(value); return *this; } - + DigitalOut& operator= (DigitalOut& rhs) { write(rhs.read()); return *this; } - + /** A shorthand for read() */ operator int() { @@ -100,4 +100,4 @@ } // namespace mbed -#endif +#endif