[][src]Struct stm32f3xx_hal_v2::dac::Dac

pub struct Dac { /* fields omitted */ }

Implementations

impl Dac[src]

pub fn new<P: Pins>(
    regs: DAC,
    _pins: P,
    channel: Channel,
    bits: DacBits,
    vref: f32
) -> Self
[src]

Create a new DAC instance

pub fn enable(&mut self, apb1: &mut APB1)[src]

Enable the DAC.

pub fn disable(&mut self, apb1: &mut APB1)[src]

Disable the DAC

pub fn set_value(&mut self, val: u32)[src]

Set the DAC value as an integer.

pub fn set_voltage(&mut self, volts: f32)[src]

Set the DAC voltage. v is in Volts.

pub fn set_trigger(&mut self, trigger: Trigger)[src]

pub fn trigger_lfsr(&mut self, trigger: Trigger, data: u32)[src]

Independent trigger with single LFSR generation See f303 Reference Manual section 16.5.2

pub fn trigger_triangle(&mut self, trigger: Trigger, data: u32)[src]

Independent trigger with single triangle generation See f303 Reference Manual section 16.5.2

Trait Implementations

impl Debug for Dac[src]

impl SingleChannelDac<u32> for Dac[src]

type Error = DacError

Error type returned by DAC methods

pub fn try_set_value(&mut self, val: u32) -> Result<(), DacError>[src]

Set the DAC value as an integer.

Auto Trait Implementations

impl Send for Dac[src]

impl !Sync for Dac[src]

impl Unpin for Dac[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.