ads1115 only
Fork of mbed by
Diff: AnalogOut.h
- Revision:
- 55:d722ed6a4237
- Parent:
- 54:71b101360fb9
- Child:
- 59:0883845fe643
--- a/AnalogOut.h Tue Jan 08 12:46:36 2013 +0000 +++ b/AnalogOut.h Wed Jan 16 12:56:34 2013 +0000 @@ -35,9 +35,9 @@ * Example: * @code * // Make a sawtooth output - * + * * #include "mbed.h" - * + * * AnalogOut tri(p18); * int main() { * while(1) { @@ -55,16 +55,16 @@ public: /** Create an AnalogOut connected to the specified pin - * + * * @param AnalogOut pin to connect to (18) */ AnalogOut(PinName pin) { analogout_init(&_dac, pin); } - + /** Set the output voltage, specified as a percentage (float) * - * @param value A floating-point value representing the output voltage, + * @param value A floating-point value representing the output voltage, * specified as a percentage. The value should lie between * 0.0f (representing 0v / 0%) and 1.0f (representing 3.3v / 100%). * Values outside this range will be saturated to 0.0f or 1.0f. @@ -72,7 +72,7 @@ void write(float value) { analogout_write(&_dac, value); } - + /** Set the output voltage, represented as an unsigned short in the range [0x0, 0xFFFF] * * @param value 16-bit unsigned short representing the output voltage, @@ -85,7 +85,7 @@ /** Return the current output voltage setting, measured as a percentage (float) * * @returns - * A floating-point value representing the current voltage being output on the pin, + * A floating-point value representing the current voltage being output on the pin, * measured as a percentage. The returned value will lie between * 0.0f (representing 0v / 0%) and 1.0f (representing 3.3v / 100%). * @@ -103,7 +103,7 @@ write(percent); return *this; } - + AnalogOut& operator= (AnalogOut& rhs) { write(rhs.read()); return *this;