[−][src]Struct veml6075::Veml6075
Veml6075 device driver.
Methods
impl<I2C, E> Veml6075<I2C> where
I2C: Write<Error = E>,
[src]
I2C: Write<Error = E>,
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]
&mut self,
it: IntegrationTime
) -> Result<(), Error<E>>
Set the integration time.
pub fn set_dynamic_setting(
&mut self,
ds: DynamicSetting
) -> Result<(), Error<E>>
[src]
&mut self,
ds: DynamicSetting
) -> Result<(), Error<E>>
Set the dynamic setting.
impl<I2C, E> Veml6075<I2C> where
I2C: WriteRead<Error = E>,
[src]
I2C: WriteRead<Error = E>,
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
Auto Trait Implementations
impl<I2C> Unpin for Veml6075<I2C> where
I2C: Unpin,
I2C: Unpin,
impl<I2C> Send for Veml6075<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for Veml6075<I2C> where
I2C: Sync,
I2C: Sync,
Blanket Implementations
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> From<T> for T
[src]
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,