Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
|
4.2.99 |
Go to the source code of this file.
Macros | |
#define | VEML6031_IT_COUNT 8 |
ALS integration time settings in veml6031_it. | |
#define | VEML6031_DIV4_COUNT 2 |
Effective photodiode size in enum veml6031_size. | |
#define | VEML6031_GAIN_COUNT 4 |
Gain selections in enum veml6031_gain. |
#define VEML6031_DIV4_COUNT 2 |
Effective photodiode size in enum veml6031_size.
#define VEML6031_GAIN_COUNT 4 |
Gain selections in enum veml6031_gain.
#define VEML6031_IT_COUNT 8 |
ALS integration time settings in veml6031_it.
VEML6031 specific sensor attributes.
For high and low threshold window settings (ALS_WH_L, ALS_WH_H, ALS_WL_L and ALS_WL_H) 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, integration time and effective photodiode size settings. So a change in gain, integration time or effective photodiode size 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.
When the sensor goes into saturation -E2BIG is returned. This happens when the maximum value 0xFFFF is returned as raw ALS value. In this case it's up to the user to reduce one or more of the following attributes to come back into the optimal measurement range of the sensor: SENSOR_ATTR_VEML6031_GAIN (gain) SENSOR_ATTR_VEML6031_IT (integration time) SENSOR_ATTR_VEML6031_DIV4 (effective photodiode size)
Enumerator | |
---|---|
SENSOR_ATTR_VEML6031_IT | Integration time setting for ALS measurements (IT). Use enum veml6031_it for attribute values. |
SENSOR_ATTR_VEML6031_DIV4 | Effective photodiode size (DIV4) Use enum veml6031_div4 for attribute values. |
SENSOR_ATTR_VEML6031_GAIN | Gain setting for ALS measurements (GAIN). Use enum veml6031_gain for attribute values. |
SENSOR_ATTR_VEML6031_PERS | ALS persistence protect number setting (PERS). Use enum veml6031_pers for attribute values. |
VEML6031 specific sensor channels.
enum veml6031_div4 |
enum veml6031_gain |
enum veml6031_it |
enum veml6031_pers |