[−][src]Struct gyuvl53l0x::VL53L0X
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]
I2C: WriteRead<Error = E>,
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]
i2c: &'a mut I2C,
address: u8,
io_mode2v8: bool
) -> Result<VL53L0X, Error<E>> where
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C,
address: u8
) -> Result<bool, E> where
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C,
period_millis: u32
) -> Result<(), E> where
I2C: WriteRead<Error = E>,
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]
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C
) -> Result<u16, Error<E>> where
I2C: WriteRead<Error = E>,
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]
I2C: WriteRead<Error = E>,
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]
&mut self,
i2c: &'a mut I2C,
budget_microseconds: u32
) -> Result<bool, E> where
I2C: WriteRead<Error = E>,
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]
fn clone(&self) -> VL53L0X
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self