Struct veml7700::Veml7700[][src]

pub struct Veml7700<I2C> { /* fields omitted */ }
Expand description

VEML7700 device driver.

Implementations

Create new instance of the VEML6040 device.

Destroy driver instance, return I²C bus instance.

Enable the device.

Note that when activating the sensor a wait time of 4 ms should be observed before the first measurement is picked up to allow for a correct start of the signal processor and oscillator.

Disable the device (shutdown).

Set the integration time.

Set the gain.

Set the number of times a threshold crossing must happen consecutively to trigger an interrupt.

Enable interrupt generation.

Disable interrupt generation.

Set the ALS high threshold in raw format

Set the ALS low threshold in raw format

Set the ALS high threshold in lux.

For values higher than 1000 lx and 1/4 or 1/8 gain, the inverse of the compensation formula is applied (this involves quite some math).

Set the ALS low threshold in lux.

For values higher than 1000 lx and 1/4 or 1/8 gain, the inverse of the compensation formula is applied (this involves quite some math).

Calculate raw value for threshold applying compensation if necessary.

This takes into consideration the configured integration time and gain and compensates the lux value if necessary.

For values higher than 1000 lx and 1/4 or 1/8 gain, the inverse of the compensation formula is applied. This involves quite some math so it may be interesting to calculate the threshold values ahead of time.

Enable the power-saving mode

Disable the power-saving mode

Read whether an interrupt has occurred.

Note that the interrupt status is updated at the same rate as the measurements. Once triggered, flags will stay true until a measurement is taken which does not exceed the threshold.

Read ALS high resolution output data in raw format

Read ALS high resolution output data converted to lux

For values higher than 1000 lx and 1/4 or 1/8 gain, the following compensation formula is applied: lux = 6.0135e-13*(lux^4) - 9.3924e-9*(lux^3) + 8.1488e-5*(lux^2) + 1.0023*lux

Calculate lux value for a raw ALS measurement.

This takes into consideration the configured integration time and gain and compensates the lux value if necessary.

For values higher than 1000 lx and 1/4 or 1/8 gain, the following compensation formula is applied: lux = 6.0135e-13*(lux^4) - 9.3924e-9*(lux^3) + 8.1488e-5*(lux^2) + 1.0023*lux

Read white channel measurement

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.