pub struct Veml6040<I2C> { /* private fields */ }
Expand description
VEML6040 device driver.
Implementations
sourceimpl<I2C, E> Veml6040<I2C>where
I2C: Write<Error = E>,
impl<I2C, E> Veml6040<I2C>where
I2C: Write<Error = E>,
sourcepub fn set_integration_time(
&mut self,
it: IntegrationTime
) -> Result<(), Error<E>>
pub fn set_integration_time(
&mut self,
it: IntegrationTime
) -> Result<(), Error<E>>
Set the integration time.
sourcepub fn set_measurement_mode(
&mut self,
mode: MeasurementMode
) -> Result<(), Error<E>>
pub fn set_measurement_mode(
&mut self,
mode: MeasurementMode
) -> Result<(), Error<E>>
Set the measurement mode: Auto
/Manual
.
sourcepub fn trigger_measurement(&mut self) -> Result<(), Error<E>>
pub fn trigger_measurement(&mut self) -> Result<(), Error<E>>
Trigger a measurement when on Manual
measurement mode.
This is not necessary on Auto
measurement mode.
sourceimpl<I2C, E> Veml6040<I2C>where
I2C: WriteRead<Error = E>,
impl<I2C, E> Veml6040<I2C>where
I2C: WriteRead<Error = E>,
sourcepub fn read_red_channel(&mut self) -> Result<u16, Error<E>>
pub fn read_red_channel(&mut self) -> Result<u16, Error<E>>
Read the red channel measurement data.
sourcepub fn read_green_channel(&mut self) -> Result<u16, Error<E>>
pub fn read_green_channel(&mut self) -> Result<u16, Error<E>>
Read the green channel measurement data.
sourcepub fn read_blue_channel(&mut self) -> Result<u16, Error<E>>
pub fn read_blue_channel(&mut self) -> Result<u16, Error<E>>
Read the blue channel measurement data.
sourcepub fn read_white_channel(&mut self) -> Result<u16, Error<E>>
pub fn read_white_channel(&mut self) -> Result<u16, Error<E>>
Read the white channel measurement data.
sourcepub fn read_all_channels(&mut self) -> Result<AllChannelMeasurement, Error<E>>
pub fn read_all_channels(&mut self) -> Result<AllChannelMeasurement, Error<E>>
Read the measurement data of all channels at once.
Trait Implementations
Auto Trait Implementations
impl<I2C> RefUnwindSafe for Veml6040<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for Veml6040<I2C>where
I2C: Send,
impl<I2C> Sync for Veml6040<I2C>where
I2C: Sync,
impl<I2C> Unpin for Veml6040<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for Veml6040<I2C>where
I2C: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more