[−][src]Struct gyuvl53l0x::VL53L0X
Device struct
Methods
impl<I2C, E> VL53L0X<I2C> where
I2C: WriteRead<Error = E> + Write<Error = E>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
pub fn default(i2c: I2C) -> Result<VL53L0X<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]
I2C: WriteRead<Error = E>,
Creates a sensor with default configuration
pub fn new(
i2c: I2C,
address: u8,
io_mode2v8: bool
) -> Result<VL53L0X<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
[src]
i2c: I2C,
address: u8,
io_mode2v8: bool
) -> Result<VL53L0X<I2C>, Error<E>> where
I2C: WriteRead<Error = E>,
Creates a sensor with specific configuration
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 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.
pub fn stop_continuous(&mut self) -> Result<(), E>
[src]
Stop continuous ranging
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]
&mut self
) -> Result<u16, Error<E>>
readRangeContinuousMillimeters (blocking)
pub fn read_range_single_millimeters_blocking(
&mut self
) -> Result<u16, Error<E>>
[src]
&mut self
) -> Result<u16, Error<E>>
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]
&mut self,
budget_microseconds: u32
) -> Result<bool, E>
setMeasurementTimingBudget(budget_microseconds)
Auto Trait Implementations
impl<I2C> Unpin for VL53L0X<I2C> where
I2C: Unpin,
I2C: Unpin,
impl<I2C> Send for VL53L0X<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for VL53L0X<I2C> where
I2C: Sync,
I2C: Sync,
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 = Infallible
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