[][src]Struct gyuvl53l0x::ConnectedVL53L0X

pub struct ConnectedVL53L0X<'a, I2C> { /* fields omitted */ }

Actual implementation for VL53L0X functions (given an I2C bus)

Methods

impl<'a, I2C, E> ConnectedVL53L0X<'a, I2C> where
    I2C: WriteRead<Error = E>, 
[src]

pub fn new(
    i2c: &'a mut I2C,
    io_mode2v8: bool,
    address: u8
) -> ConnectedVL53L0X<'a, I2C>
[src]

Create chip data for the first time

pub fn from_state(
    state: &VL53L0X,
    i2c: &'a mut I2C
) -> ConnectedVL53L0X<'a, I2C>
[src]

Create chip data from chip state

pub fn get_state(&self) -> VL53L0X[src]

Get chip state

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

Initialize chip

pub fn set_device_address(&mut self, address: u8) -> Result<bool, E>[src]

Set new address for device

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

Stop continuous measurements

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

Reads and returns range measurement in millimiters

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

Returns a range reading in millimeters when continuous mode is active

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

Returns a single reading in millimeters

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

Returns WHO_AM_I register

pub fn set_measurement_timing_budget(
    &mut self,
    budget_microseconds: u32
) -> Result<bool, 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<'a, I2C: Debug> Debug for ConnectedVL53L0X<'a, I2C>[src]

Auto Trait Implementations

impl<'a, I2C> Unpin for ConnectedVL53L0X<'a, I2C>

impl<'a, I2C> Send for ConnectedVL53L0X<'a, I2C> where
    I2C: Send

impl<'a, I2C> Sync for ConnectedVL53L0X<'a, I2C> where
    I2C: Sync

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