[−][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
i2c
will impl i2c traits forI2c
.udev
must be enabled to useEnumerator
.
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 |
|