Registry / other / i2cdev

i2cdev

JSON →
library0.6.2rscratesunverified

Provides API for safe access to Linux i2c device interface.

# Cargo.toml [dependencies] i2cdev = "0.6.2"
INSTALL
IMPORT
SIG · I2CDEV
I
i2cdev
otherrustv0.6.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

LinuxI2CDevice
use i2cdev::linux::LinuxI2CDevice;

Open an I2C device and read a byte from it.

use i2cdev::linux::LinuxI2CDevice; use i2cdev::core::I2CDevice; let mut dev = LinuxI2CDevice::new("/dev/i2c-1", 0x48).unwrap(); let buf = dev.read(1).unwrap();
Debug
Known issues
gotchaRequires Linux with I2C support and appropriate permissions.
fix
Ensure the /dev/i2c-* device exists and the user has read/write access.
affects: *
Upgrade
Version history
0.6.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
i2cdev — cargo add i2cdev · libregistry