Struct mcp4725::MCP4725[][src]

pub struct MCP4725<I2C> where
    I2C: Read + Write
{ /* fields omitted */ }
Expand description

MCP4725 DAC driver. Wraps an I2C port to send commands to an MCP4725

Implementations

Construct a new MCP4725 driver instance. i2c is the initialized i2c driver port to use, user_address is the three bit user-part of the i2c address where the MCP4725 can be reached

  • The least significant bit of this address can be set externally by pulling the A0 leg of the chip low (0) or high (1) The two most significant bits are set in the factory. There are four variants of the chip with different addresses.

Set the dac register

Set the dac and eeprom registers

Use the two byte fast command to set the dac register

Send read command and return the dac status

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.

Send a reset command on the I2C bus. WARNING: This is a general call command and can reset other devices on the bus as well.

Destroy the MCP4725 driver, return the wrapped I2C

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.