Skip to content

Commit bbd90b6

Browse files
committed
AnalogOut: Add explicit pinmap support
1 parent eab08d7 commit bbd90b6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/AnalogOut.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ class AnalogOut {
6666
analogout_init(&_dac, pin);
6767
}
6868

69+
/** Create an AnalogOut connected to the specified pin
70+
*
71+
* @param pinmap reference to strucure which holds static pinmap.
72+
*/
73+
AnalogOut(const PinMap &pinmap)
74+
{
75+
analogout_init_direct(&_dac, &pinmap);
76+
}
77+
6978
/** Set the output voltage, specified as a percentage (float)
7079
*
7180
* @param value A floating-point value representing the output voltage,

0 commit comments

Comments
 (0)