Struct dac5578::DAC5578 [−][src]
Expand description
DAC5578 driver. Wraps an I2C port to send commands to a DAC5578
Implementations
impl<I2C, E> DAC5578<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
[src]
impl<I2C, E> DAC5578<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
[src]pub fn new(i2c: I2C, address: Address) -> Self
[src]
pub fn new(i2c: I2C, address: Address) -> Self
[src]Construct a new DAC5578 driver instance.
i2c is the initialized i2c driver port to use, address depends on the state of the ADDR0 pin (see Address
)
pub fn write(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]
pub fn write(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]Write to the channel’s DAC input register
pub fn update(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]
pub fn update(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]Selects DAC channel to be updated
pub fn write_and_update(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]
pub fn write_and_update(&mut self, channel: Channel, data: u8) -> Result<(), E>
[src]Write to DAC input register for a channel and update channel DAC register
pub fn write_and_update_all(
&mut self,
channel: Channel,
data: u8
) -> Result<(), E>
[src]
pub fn write_and_update_all(
&mut self,
channel: Channel,
data: u8
) -> Result<(), E>
[src]Write to Selected DAC Input Register and Update All DAC Registers (Global Software LDAC)
pub fn reset(&mut self, mode: ResetMode) -> Result<(), E>
[src]
pub fn reset(&mut self, mode: ResetMode) -> Result<(), E>
[src]Perform a software reset using the selected mode
pub fn wake_up_all(&mut self) -> Result<(), E>
[src]
pub fn wake_up_all(&mut self) -> Result<(), E>
[src]Send a wake-up command over the I2C bus. WARNING: This is a general call command and can wake-up other devices on the bus as well.
Trait Implementations
Auto Trait Implementations
impl<I2C> Send for DAC5578<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for DAC5578<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for DAC5578<I2C> where
I2C: Unpin,
I2C: Unpin,