rust-i2cdev
rust-i2cdev copied to clipboard
Rust library for interfacing with i2c devices under Linux
I found that the smbus functions were unimplemented when trying to test my code. I require access to these functions because I use the `smbus_*` in the driver to communicate...
It may be worthwhile for `smbus_read_i2c_block_data()` and similar functions to write data into a preallocated buffer (of fixed size `&mut [u8]`, or allowing the function to resize a `&mut [u8]`),...
Async IO
Hi, Is it possible to have async functions binding in the same way that [`gpio_cdev::AsyncLineEventHandle`](https://docs.rs/gpio-cdev/latest/gpio_cdev/struct.AsyncLineEventHandle.html) does? Is it as simple as opening the device file in non-blocking mode and warping...
This seeks to address the issue with the `LinuxI2CDevice` not correctly implementing the I2c trait as mentioned in rust-embedded/linux-embedded-hal#82. I am not sure whether the fix really belongs in this...
```rust #[test] fn check_read_0() { let mut i2c = MockI2CDevice::new(); let value = i2c.smbus_read_byte_data(0).unwrap(); assert_eq!(value, 0); } ``` This code panics with `attempt to subtract with overflow` because offset is...
We've got a few unreleased changes that we should get up to crates.io.
Why this crate implements a proper way of mocking the protocol? It would be much more flexible, for unit test purposes, to provide to the end user the possibility to...
I try ro define a struct like this: ``` use linux_embedded_hal::I2cdev; use pwm_pca9685::{Address, Channel, Pca9685}; #[derive(Debug)] pub struct Executor { ll: Leg, rl: Leg, lf: Foot, rf: Foot, pwm: Pca9685,...
While trying to work with an IC, I noticed that the library does not currently support I2C protocol mangling. I was wondering if support was planned, otherwise I could try...