AnalogOut: Add explicit pinmap support

pull/11892/head
Przemyslaw Stekiel 2019-08-26 14:12:09 +02:00
parent eab08d7047
commit bbd90b604b
1 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,15 @@ public:
analogout_init(&_dac, pin);
}
/** Create an AnalogOut connected to the specified pin
*
* @param pinmap reference to strucure which holds static pinmap.
*/
AnalogOut(const PinMap &pinmap)
{
analogout_init_direct(&_dac, &pinmap);
}
/** Set the output voltage, specified as a percentage (float)
*
* @param value A floating-point value representing the output voltage,