Struct veml6075::VEML6075 [−][src]
pub struct VEML6075<I2C> { /* fields omitted */ }
VEML6075 device driver.
Methods
impl<I2C, E> VEML6075<I2C> where
I2C: Write<Error = E>,
[src]
impl<I2C, E> VEML6075<I2C> where
I2C: Write<Error = E>,
pub fn new(i2c: I2C) -> Self
[src]
pub fn new(i2c: I2C) -> Self
Create new instance of the VEML6075 device.
pub fn destroy(self) -> I2C
[src]
pub fn destroy(self) -> I2C
Destroy driver instance, return I²C bus instance.
pub fn enable(&mut self) -> Result<(), Error<E>>
[src]
pub fn enable(&mut self) -> Result<(), Error<E>>
Enable the sensor.
pub fn disable(&mut self) -> Result<(), Error<E>>
[src]
pub fn disable(&mut self) -> Result<(), Error<E>>
Disable the sensor (shutdown).
impl<I2C, E> VEML6075<I2C> where
I2C: WriteRead<Error = E>,
[src]
impl<I2C, E> VEML6075<I2C> where
I2C: WriteRead<Error = E>,
pub fn read_uva(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_uva(&mut self) -> Result<u16, Error<E>>
Read the UVA sensor data.
pub fn read_uvb(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_uvb(&mut self) -> Result<u16, Error<E>>
Read the UVB sensor data.
pub fn read_uvcomp1(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_uvcomp1(&mut self) -> Result<u16, Error<E>>
Read the UVcomp1 sensor data.
pub fn read_uvcomp2(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_uvcomp2(&mut self) -> Result<u16, Error<E>>
Read the UVcomp2 sensor data.
pub fn read_device_id(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_device_id(&mut self) -> Result<u16, Error<E>>
Read the device ID
Trait Implementations
impl<I2C: Debug> Debug for VEML6075<I2C>
[src]
impl<I2C: Debug> Debug for VEML6075<I2C>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I2C: Default> Default for VEML6075<I2C>
[src]
impl<I2C: Default> Default for VEML6075<I2C>