mbed-drivers
|
#include <AnalogOut.h>
Public Member Functions | |
AnalogOut (PinName pin) | |
void | write (float value) |
void | write_u16 (unsigned short value) |
float | read () |
AnalogOut & | operator= (float percent) |
AnalogOut & | operator= (AnalogOut &rhs) |
operator float () | |
Protected Attributes | |
dac_t | _dac |
An analog output, used for setting the voltage on a pin
Example:
|
inline |
|
inline |
An operator shorthand for read()
|
inline |
Return the current output voltage setting, measured as a percentage (float)
|
inline |
Set the output voltage, specified as a percentage (float)
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. |
|
inline |
Set the output voltage, represented as an unsigned short in the range [0x0, 0xFFFF]
value | 16-bit unsigned short representing the output voltage, normalised to a 16-bit value (0x0000 = 0v, 0xFFFF = 3.3v) |