Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
tsl2591.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023 Kurtis Dinelle
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
15#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_TSL2591_H_
16#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_TSL2591_H_
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
25 /* Sensor ADC Gain Mode
26 * Rather than set this value directly, can only be set to operate in one of four modes:
27 *
28 * TSL2591_SENSOR_GAIN_LOW
29 * TSL2591_SENSOR_GAIN_MED
30 * TSL2591_SENSOR_GAIN_HIGH
31 * TSL2591_SENSOR_GAIN_MAX
32 *
33 * See datasheet for actual typical gain scales these modes correspond to.
34 */
36
37 /* Sensor ADC Integration Time (in ms)
38 * Can only be set to one of six values:
39 *
40 * 100, 200, 300, 400, 500, or 600
41 */
43
44 /* Sensor ALS Interrupt Persist Filter
45 * Represents the number of consecutive sensor readings outside of a set threshold
46 * before triggering an interrupt. Can only be set to one of sixteen values:
47 *
48 * 0, 1, 2, 3, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, or 60
49 *
50 * Setting this to 0 causes an interrupt to generate every ALS cycle,
51 * regardless of threshold.
52 * Setting this to 1 is equivalent to the no-persist interrupt mode.
53 */
55};
56
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_TSL2591_H_ */
@ SENSOR_ATTR_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:356
Public APIs for the sensor driver.
sensor_gain_tsl2591
Definition tsl2591.h:57
@ TSL2591_SENSOR_GAIN_MED
Definition tsl2591.h:59
@ TSL2591_SENSOR_GAIN_HIGH
Definition tsl2591.h:60
@ TSL2591_SENSOR_GAIN_LOW
Definition tsl2591.h:58
@ TSL2591_SENSOR_GAIN_MAX
Definition tsl2591.h:61
sensor_attribute_tsl2591
Definition tsl2591.h:24
@ SENSOR_ATTR_INT_PERSIST
Definition tsl2591.h:54
@ SENSOR_ATTR_GAIN_MODE
Definition tsl2591.h:35
@ SENSOR_ATTR_INTEGRATION_TIME
Definition tsl2591.h:42