Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Vishay VEML6046 RGBIR Sensor. More...

Files

file  veml6046.h
 Header file for extended sensor API of VEML6046 sensor.

Enumerations

enum  veml6046_pdd { VEML6046_SIZE_2_2 = 0x00 , VEML6046_SIZE_1_2 = 0x01 }
 VEML6046 size options for light measurements. More...
enum  sensor_attribute_veml6046 { SENSOR_ATTR_VEML6046_IT = SENSOR_ATTR_PRIV_START , SENSOR_ATTR_VEML6046_PDD , SENSOR_ATTR_VEML6046_GAIN , SENSOR_ATTR_VEML6046_PERS }
 VEML6046 specific sensor attributes. More...
enum  sensor_channel_veml6046 { SENSOR_CHAN_VEML6046_RED_RAW_COUNTS = SENSOR_CHAN_PRIV_START , SENSOR_CHAN_VEML6046_GREEN_RAW_COUNTS , SENSOR_CHAN_VEML6046_BLUE_RAW_COUNTS , SENSOR_CHAN_VEML6046_IR_RAW_COUNTS }
 VEML6046 specific sensor channels. More...

Detailed Description

Vishay VEML6046 RGBIR Sensor.

Enumeration Type Documentation

◆ sensor_attribute_veml6046

#include <zephyr/drivers/sensor/veml6046.h>

VEML6046 specific sensor attributes.

For high and low threshold window settings (G_THDH_L, G_THDH_H, G_THDL_L and G_THDL_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.

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_VEML6046_GAIN (gain) SENSOR_ATTR_VEML6046_IT (integration time) SENSOR_ATTR_VEML6046_PDD (effective photodiode size)

Enumerator
SENSOR_ATTR_VEML6046_IT 

Integration time setting for measurements (IT).

Use enum veml6046_it for attribute values.

SENSOR_ATTR_VEML6046_PDD 

Effective photodiode size (PDD)

Use enum veml6046_pdd for attribute values.

SENSOR_ATTR_VEML6046_GAIN 

Gain setting for measurements (GAIN).

Use enum veml6046_gain for attribute values.

SENSOR_ATTR_VEML6046_PERS 

Persistence protect number setting (PERS).

Use enum veml6046_pers for attribute values.

◆ sensor_channel_veml6046

#include <zephyr/drivers/sensor/veml6046.h>

VEML6046 specific sensor channels.

Enumerator
SENSOR_CHAN_VEML6046_RED_RAW_COUNTS 

Channel for raw red sensor values.

This channel represents the raw measurement counts provided by the sensor register. It is useful for estimating good values for integration time, effective photodiode size and gain attributes in fetch and get mode.

For future implementations with triggers it can also be used to estimate the threshold window attributes for the sensor interrupt handling.

It cannot be fetched directly. Instead, this channel's value is fetched implicitly using SENSOR_CHAN_RED. Trying to call sensor_channel_fetch_chan with this enumerator as an argument will result in a -ENOTSUP.

SENSOR_CHAN_VEML6046_GREEN_RAW_COUNTS 

Channel for green sensor values.

This channel is the raw green channel count output of the sensor. About fetching the same as for SENSOR_CHAN_VEML6046_RED_RAW_COUNTS applies.

SENSOR_CHAN_VEML6046_BLUE_RAW_COUNTS 

Channel for blue sensor values.

This channel is the raw blue channel count output of the sensor. About fetching the same as for SENSOR_CHAN_VEML6046_RED_RAW_COUNTS applies.

SENSOR_CHAN_VEML6046_IR_RAW_COUNTS 

Channel for IR sensor values.

This channel is the raw IR channel count output of the sensor. About fetching the same as for SENSOR_CHAN_VEML6046_RED_RAW_COUNTS applies.

◆ veml6046_pdd

#include <zephyr/drivers/sensor/veml6046.h>

VEML6046 size options for light measurements.

Possible values for SENSOR_ATTR_VEML6046_PDD custom attribute.

Enumerator
VEML6046_SIZE_2_2 

2/2 photodiode size

VEML6046_SIZE_1_2 

1/2 photodiode size