[][src]Struct veml6075::Veml6075

pub struct Veml6075<I2C> { /* fields omitted */ }

Veml6075 device driver.

Methods

impl<I2C, E> Veml6075<I2C> where
    I2C: Write<Error = E>, 
[src]

pub fn new(i2c: I2C, calibration: Calibration) -> Self[src]

Create new instance of the Veml6075 device.

pub fn destroy(self) -> I2C[src]

Destroy driver instance, return I²C bus instance.

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

Enable the sensor.

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

Disable the sensor (shutdown).

pub fn set_mode(&mut self, mode: Mode) -> Result<(), Error<E>>[src]

Set operating mode

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

Trigger a measurement when on active force (one-shot) mode.

pub fn set_integration_time(
    &mut self,
    it: IntegrationTime
) -> Result<(), Error<E>>
[src]

Set the integration time.

pub fn set_dynamic_setting(
    &mut self,
    ds: DynamicSetting
) -> Result<(), Error<E>>
[src]

Set the dynamic setting.

impl<I2C, E> Veml6075<I2C> where
    I2C: WriteRead<Error = E>, 
[src]

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

Read the sensor data and calculate calibrated reading values.

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

Read the raw UVA sensor data.

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

Read the raw UVB sensor data.

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

Read the raw UVcomp1 sensor data.

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

Read the raw UVcomp2 sensor data.

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

Read the device ID

Trait Implementations

impl<I2C: Debug> Debug for Veml6075<I2C>[src]

impl<I2C: Default> Default for Veml6075<I2C>[src]

Auto Trait Implementations

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

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

impl<I2C> Sync for Veml6075<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 = Infallible

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]