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

AMS TCS34725 RGBC color sensor. More...

Files

file  tcs34725.h
 Header file for extended sensor API of TCS34725 sensor.

Enumerations

enum  tcs34725_channel { SENSOR_CHAN_TCS34725_LUX = SENSOR_CHAN_PRIV_START , SENSOR_CHAN_TCS34725_COLOR_TEMP }
 Custom sensor channels for TCS34725. More...

Detailed Description

AMS TCS34725 RGBC color sensor.

Enumeration Type Documentation

◆ tcs34725_channel

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

Custom sensor channels for TCS34725.

Values derived from the raw clear, red, green and blue readings using the ams DN40 algorithm, read with sensor_channel_get() after a successful sensor_sample_fetch().

For these channels, sensor_value.val2 is a validity flag, not a fractional part:

  • 1: the DN40 calculation succeeded and sensor_value.val1 holds the measurement.
  • 0: the calculation could not produce a reliable result, because an RGBC channel is saturated, the clear channel is below the usable minimum, or the light is a highly saturated single color outside the DN40 input domain. sensor_value.val1 is then 0 and must not be read as "0 lux" or "0 K".

The raw SENSOR_CHAN_RED, SENSOR_CHAN_GREEN, SENSOR_CHAN_BLUE and SENSOR_CHAN_LIGHT channels are always valid and their sensor_value.val2 is always 0.

Enumerator
SENSOR_CHAN_TCS34725_LUX 

Illuminance, from the DN40 algorithm.

SENSOR_CHAN_TCS34725_COLOR_TEMP 

Correlated color temperature, from the DN40 algorithm.