[][src]Crate i2c_linux

A safe interface to the Linux I2C and SMBus userspace subsystem.

Example

extern crate i2c_linux;
use i2c_linux::I2c;

let mut i2c = I2c::from_path("/dev/i2c-0")?;
i2c.smbus_set_slave_address(0x50, false)?;
let data = i2c.smbus_read_byte()?;
println!("Read I2C data: {}", data);

Cargo Features

Structs

Enumerator

Enumerates all available i2c devices on the system.

Functionality

To determine what functionality is present

I2c

A safe wrapper around an I2C device.

ReadFlags

Flags to work around device quirks.

WriteFlags

Flags to work around device quirks.

Enums

Message

Part of a combined I2C transaction.

ReadWrite

i2c_smbus_xfer read or write markers