Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

AMS TSL2591 ambient light sensor. More...

Files

file  tsl2591.h
 Extended public API for AMS's TSL2591 ambient light sensor.

Enumerations

enum  sensor_attribute_tsl2591 { SENSOR_ATTR_GAIN_MODE = SENSOR_ATTR_PRIV_START + 1 , SENSOR_ATTR_INTEGRATION_TIME , SENSOR_ATTR_INT_PERSIST }
 Custom sensor attributes for TSL2591. More...
enum  sensor_gain_tsl2591 { TSL2591_SENSOR_GAIN_LOW , TSL2591_SENSOR_GAIN_MED , TSL2591_SENSOR_GAIN_HIGH , TSL2591_SENSOR_GAIN_MAX }
 Gain modes for the TSL2591 SENSOR_ATTR_GAIN_MODE attribute. More...

Detailed Description

AMS TSL2591 ambient light sensor.

Enumeration Type Documentation

◆ sensor_attribute_tsl2591

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

Custom sensor attributes for TSL2591.

Enumerator
SENSOR_ATTR_GAIN_MODE 

Sensor ADC gain mode, one of sensor_gain_tsl2591.

See the datasheet for the typical gain scales these modes correspond to.

SENSOR_ATTR_INTEGRATION_TIME 

Sensor ADC integration time, in ms.

Can only be set to one of six values:

100, 200, 300, 400, 500, or 600

SENSOR_ATTR_INT_PERSIST 

Sensor ALS interrupt persist filter.

Represents the number of consecutive sensor readings outside of a set threshold before triggering an interrupt. Can only be set to one of sixteen values:

0, 1, 2, 3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, or 60

Setting this to 0 causes an interrupt to generate every ALS cycle, regardless of threshold. Setting this to 1 is equivalent to the no-persist interrupt mode.

◆ sensor_gain_tsl2591

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

Gain modes for the TSL2591 SENSOR_ATTR_GAIN_MODE attribute.

Enumerator
TSL2591_SENSOR_GAIN_LOW 

Low gain.

TSL2591_SENSOR_GAIN_MED 

Medium gain.

TSL2591_SENSOR_GAIN_HIGH 

High gain.

TSL2591_SENSOR_GAIN_MAX 

Maximum gain.