[][src]Struct mcp4725::FastCommand

pub struct FastCommand { /* fields omitted */ }

A FastCommand to send to the MCP4725. Fast commands are stripped down commands that can be used to send data in only 2 bytes instead of 3. It can only be used to set the DAC register. Not to write to the EEPROM that stores the default values. As with the normal Command the address(), power_mode() and data() builder methods can be used to set parameters. FastCommands can be sent using the send_fast method on the MCP4725 driver.

Methods

impl FastCommand[src]

pub fn bytes(&self) -> [u8; 2][src]

pub fn data(self, data: u16) -> Self[src]

Set the data to send with this command. This data will be truncated to a 12 bit int

pub fn power_mode(self, mode: PowerMode) -> Self[src]

Set the power mode

Trait Implementations

impl Default for FastCommand[src]

Auto Trait Implementations

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, 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.