4 releases
Uses old Rust 2015
0.1.2 | Nov 18, 2018 |
---|---|
0.1.1 | Mar 29, 2018 |
0.1.0 | Mar 25, 2018 |
0.0.1 | Mar 17, 2018 |
#1354 in Hardware support
1,713 downloads per month
Used in 10 crates
(4 directly)
28KB
478 lines
i2c-linux
i2c-linux
provides safe bindings over the Linux I2C subsystem, and is an
alternative to the i2cdev crate.
Documentation
See the documentation for up to date information.
lib.rs
:
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
.
Dependencies
~200–320KB