Struct veml6070::VEML6070 [−][src]
pub struct VEML6070<I2C> { /* fields omitted */ }
VEML6070 device driver.
Methods
impl<I2C, E> VEML6070<I2C> where
I2C: Write<Error = E>,
[src]
impl<I2C, E> VEML6070<I2C> where
I2C: Write<Error = E>,
pub fn new(i2c: I2C) -> Self
[src]
pub fn new(i2c: I2C) -> Self
Create new instance of the VEML6070 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).
pub fn set_integration_time(
&mut self,
it: IntegrationTime
) -> Result<(), Error<E>>
[src]
pub fn set_integration_time(
&mut self,
it: IntegrationTime
) -> Result<(), Error<E>>
Set integration time.
pub fn enable_ack(&mut self) -> Result<(), Error<E>>
[src]
pub fn enable_ack(&mut self) -> Result<(), Error<E>>
Enable the ACK signal.
Note: The ACK must be cleared every time after it has fired with clear_ack()
.
pub fn disable_ack(&mut self) -> Result<(), Error<E>>
[src]
pub fn disable_ack(&mut self) -> Result<(), Error<E>>
Disable the ACK signal.
pub fn set_ack_threshold(
&mut self,
threshold: AckThreshold
) -> Result<(), Error<E>>
[src]
pub fn set_ack_threshold(
&mut self,
threshold: AckThreshold
) -> Result<(), Error<E>>
Set ACK threshold.
pub fn enable_ack_with_threshold(
&mut self,
threshold: AckThreshold
) -> Result<(), Error<E>>
[src]
pub fn enable_ack_with_threshold(
&mut self,
threshold: AckThreshold
) -> Result<(), Error<E>>
Enable the ACK signal and set the ACK threshold at once.
Note: The ACK must be cleared every time after it has fired with clear_ack()
.
impl<I2C, E> VEML6070<I2C> where
I2C: Read<Error = E>,
[src]
impl<I2C, E> VEML6070<I2C> where
I2C: Read<Error = E>,
pub fn clear_ack(&mut self) -> Result<(), Error<E>>
[src]
pub fn clear_ack(&mut self) -> Result<(), Error<E>>
Clear ACK status.
Note: The ACK status must be cleared every time after it has fired. Other registers will be blocked otherwise.
pub fn read_uv(&mut self) -> Result<u16, Error<E>>
[src]
pub fn read_uv(&mut self) -> Result<u16, Error<E>>
Read the UV sensor.
impl<I2C, E> VEML6070<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
[src]
impl<I2C, E> VEML6070<I2C> where
I2C: Read<Error = E> + Write<Error = E>,
Trait Implementations
impl<I2C: Debug> Debug for VEML6070<I2C>
[src]
impl<I2C: Debug> Debug for VEML6070<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 VEML6070<I2C>
[src]
impl<I2C: Default> Default for VEML6070<I2C>