[][src]Struct gyuvl53l0x::VL53L0X

pub struct VL53L0X { /* fields omitted */ }

Struct for VL53L0X state

Methods

impl VL53L0X[src]

pub fn default<'a, I2C, E>(i2c: &'a mut I2C) -> Result<VL53L0X, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Creates a sensor with default configuration

pub fn new<'a, I2C, E>(
    i2c: &'a mut I2C,
    address: u8,
    io_mode2v8: bool
) -> Result<VL53L0X, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Creates a sensor with specific configuration

pub fn set_device_address<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C,
    address: u8
) -> Result<bool, E> where
    I2C: WriteRead<Error = E>, 
[src]

Set new address for device

pub fn start_continuous<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C,
    period_millis: u32
) -> Result<(), E> where
    I2C: WriteRead<Error = E>, 
[src]

Start continuous ranging measurements Ranging is performed in a continuous way after the API function is called. As soon as the measurement is finished, another one is started without delay. User has to stop the ranging to return to SW standby. The last measurement is completed before stopping

If period_millis is 0, continuous back-to-back mode is used (the sensor takes measurements as often as possible); otherwise, continuous timed mode is used, with the given inter-measurement period in milliseconds determining how often the sensor takes a measurement

pub fn stop_continuous<'a, I2C, E>(&mut self, i2c: &'a mut I2C) -> Result<(), E> where
    I2C: WriteRead<Error = E>, 
[src]

Stop continuous measurements

pub fn read_range_mm<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Reads and returns range measurement in millimiters

pub fn read_range_continuous_millimeters_blocking<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Returns a range reading in millimeters when continuous mode is active

pub fn read_range_single_millimeters_blocking<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
    I2C: WriteRead<Error = E>, 
[src]

Returns a single reading in millimeters

pub fn who_am_i<'a, I2C, E>(&mut self, i2c: &'a mut I2C) -> Result<u8, E> where
    I2C: WriteRead<Error = E>, 
[src]

Returns WHO_AM_I register

pub fn set_measurement_timing_budget<'a, I2C, E>(
    &mut self,
    i2c: &'a mut I2C,
    budget_microseconds: u32
) -> Result<bool, E> where
    I2C: WriteRead<Error = E>, 
[src]

Set the measurement timing budget in microseconds, which is the time allowed for one measurement; the ST API and this library take care of splitting the timing budget among the sub-steps in the ranging sequence. A longer timing budget allows for more accurate measurements. Increasing the budget by a factor of N decreases the range measurement standard deviation by a factor of sqrt(N). Defaults to about 33 milliseconds; the minimum is 20 ms

Trait Implementations

impl Debug for VL53L0X[src]

impl Copy for VL53L0X[src]

impl Clone for VL53L0X[src]

Auto Trait Implementations

impl Unpin for VL53L0X

impl Send for VL53L0X

impl Sync for VL53L0X

Blanket Implementations

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

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

type Error = !

The type returned in the event of a conversion error.

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

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self