Zephyr API Documentation 4.2.0-rc3
A Scalable Open Source RTOS
|
|
4.2.0-rc3 |
Go to the source code of this file.
Macros | |
#define | VEML7700_ALS_GAIN_ELEM_COUNT 4 |
Number of enumerators in enum veml7700_als_gain. | |
#define | VEML7700_ALS_IT_ELEM_COUNT 6 |
Number of enumerators in enum veml7700_als_it. | |
#define | VEML7700_ALS_INT_LOW_MASK BIT(15) |
Bit mask to check for the low threshold interrupt flag. | |
#define | VEML7700_ALS_INT_HIGH_MASK BIT(14) |
Bit mask to check for the high threshold interrupt flag. |
#define VEML7700_ALS_GAIN_ELEM_COUNT 4 |
Number of enumerators in enum veml7700_als_gain.
#define VEML7700_ALS_INT_HIGH_MASK BIT(14) |
Bit mask to check for the high threshold interrupt flag.
See SENSOR_ATTR_VEML7700_INT_MODE and SENSOR_CHAN_VEML7700_INTERRUPT
#define VEML7700_ALS_INT_LOW_MASK BIT(15) |
Bit mask to check for the low threshold interrupt flag.
See SENSOR_ATTR_VEML7700_INT_MODE and SENSOR_CHAN_VEML7700_INTERRUPT
#define VEML7700_ALS_IT_ELEM_COUNT 6 |
Number of enumerators in enum veml7700_als_it.
VEML7700 specific sensor attributes.
For high and low threshold window settings (ALS_WH and ALS_WL) use the generic attributes SENSOR_ATTR_UPPER_THRESH and SENSOR_ATTR_LOWER_THRESH with 16-bit unsigned integer values. Both threshold settings are in lux and converted by the driver to a value compatible with the sensor. This conversion depends on the current gain and integration time settings. So a change in gain or integration time usually requires an update of threshold window settings. To get the correct threshold values into the sensor update the thresholds -after- a change of gain or integration time.
All attributes must be set for the SENSOR_CHAN_LIGHT channel.
Enumerator | |
---|---|
SENSOR_ATTR_VEML7700_GAIN | Gain setting for ALS measurements (ALS_GAIN). Use enum veml7700_als_gain for attribute values. |
SENSOR_ATTR_VEML7700_ITIME | Integration time setting for ALS measurements (ALS_IT). Use enum veml7700_als_it for attribute values. |
SENSOR_ATTR_VEML7700_INT_MODE | Enable or disable use of ALS interrupt (ALS_INT_EN and ALS_PERS). Please mind that the VEML7700 does not have an interrupt pin. That's why this driver does not implement any asynchronous notification mechanism. Such notifications would require to periodically query the sensor for it's interrupt state and then trigger an event based on that state. It's up to the user to query the interrupt state manually using sensor_channel_fetch_chan() on the SENSOR_CHAN_VEML7700_INTERRUPT channel or using sensor_channel_fetch(). Use enum veml7700_int_mode for attribute values. |
VEML7700 specific sensor channels.
enum veml7700_als_gain |
enum veml7700_als_it |
enum veml7700_int_mode |