usb2642-i2c

API Crate

A Rust library for interfacing with the USB2642 I2C bus using the linux sg3 SCSI interface.

Usage

```rust const I2C_ADDRESS: I2CAddress = 0x12;

let mut usb2642 = USB2642I2C::open("/dev/sg0").unwrap();

// Write-Only let mut writedata = [0x01u8, 0x02u8]; usb2642.write(I2CADDRESS, &mut data).unwrap();

// Write-Read let writedata = [register.tou8().unwrap()]; let readdata = usb2642.writeread(I2C_ADDRESS, &data, 1).unwrap(); ```