Struct i2cdev_rfd77402::Rfd77402
[−]
[src]
pub struct Rfd77402 { /* fields omitted */ }
This structure defines the handle to driver
Trait Implementations
impl Poll for Rfd77402
[src]
fn poll(path: &str, polltime: u64) -> Result<Rfd77402, Rfd77402Error>
[src]
Creates a handle to the driver using polling to check for data path is the path to the i2c device e.g "/dev/i2c-1" polltime is the poll interval in milliseconds
Examples
let dev = Rfd77402::new("/dev/i2c-1", 10).expect("Creating new device failed..");
impl Measure for Rfd77402
[src]
fn get_measurement(&self) -> Measurement
[src]
Get the last measurement taken by the device
Examples
let res = dev.get_measurement(); println!("dis: {0}, amp: {1}, pix: {2}, err: {3}", res.distance, res.vector_amplitude, res.valid_pixels, res.error_code);