[][src]Struct vl53l0x::VL53L0x

pub struct VL53L0x<I2C: WriteRead> {
    pub revision_id: u8,
    // some fields omitted
}

dummy

Fields

revision_id: u8

dummy

Methods

impl<I2C, E> VL53L0x<I2C> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

pub fn new(i2c: I2C) -> Result<VL53L0x<I2C>, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Creates new driver with default address.

pub fn with_address(i2c: I2C, address: u8) -> Result<VL53L0x<I2C>, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Creates new driver with given address.

pub fn start_continuous(&mut self, period_millis: u32) -> Result<(), E>[src]

startContinuous

pub fn stop_continuous(&mut self) -> Result<(), E>[src]

stopContinuous()

pub fn read_range_mm(&mut self) -> Result<u16, Error<E>>[src]

reads and returns range measurement or nb::Error::WouldBlock if it's not ready yet

pub fn read_range_continuous_millimeters_blocking(
    &mut self
) -> Result<u16, Error<E>>
[src]

readRangeContinuousMillimeters (blocking)

pub fn read_range_single_millimeters_blocking(
    &mut self
) -> Result<u16, Error<E>>
[src]

readRangeSingleMillimeters (blocking)

pub fn who_am_i(&mut self) -> Result<u8, E>[src]

Returns who am i

pub fn set_measurement_timing_budget(
    &mut self,
    budget_microseconds: u32
) -> Result<bool, E>
[src]

setMeasurementTimingBudget(budget_microseconds)

Auto Trait Implementations

impl<I2C> Send for VL53L0x<I2C> where
    I2C: Send

impl<I2C> Sync for VL53L0x<I2C> where
    I2C: Sync

impl<I2C> Unpin for VL53L0x<I2C> where
    I2C: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.