pub struct Dac<'d> { /* private fields */ }Expand description
A digital-to-analog converter (DAC) channel.
Dropping the driver disables its analog output.
Implementations§
Source§impl<'d> Dac<'d>
impl<'d> Dac<'d>
Sourcepub fn new<T: Instance + 'd>(dac: T, pin: T::Pin) -> Selfwhere
T::Pin: AnalogPin + 'd,
pub fn new<T: Instance + 'd>(dac: T, pin: T::Pin) -> Selfwhere
T::Pin: AnalogPin + 'd,
Creates a new DAC channel.
Sourcepub const fn resolution(&self) -> u8
Available on crate feature unstable only.
pub const fn resolution(&self) -> u8
unstable only.Returns the DAC resolution in bits.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.