Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ti_hdc302x.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Psicontrol N.V.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
14
15#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_HDC302X_H_
16#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_HDC302X_H_
17
19#include <zephyr/drivers/i2c.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#define TI_HDC302X_STATUS_REG_BIT_ALERT 0x8000
26#define TI_HDC302X_STATUS_REG_BIT_HEATER_ON 0x2000
27#define TI_HDC302X_STATUS_REG_BIT_RH_ALERT 0x0800
28#define TI_HDC302X_STATUS_REG_BIT_TEMP_ALERT 0x0400
29#define TI_HDC302X_STATUS_REG_BIT_RH_HIGH_ALERT 0x0200
30#define TI_HDC302X_STATUS_REG_BIT_RH_LOW_ALERT 0x0100
31
32#define TI_HDC302X_STATUS_REG_BIT_TEMP_HIGH_ALERT 0x0080
33#define TI_HDC302X_STATUS_REG_BIT_TEMP_LOW_ALERT 0x0040
34#define TI_HDC302X_STATUS_REG_BIT_RESET_DETECTED 0x0010
35#define TI_HDC302X_STATUS_REG_BIT_CRC_FAILED 0x0001
36
38 /* Sensor low power Mode
39 * Rather than set this value directly, can only be set to operate in one of four modes:
40 *
41 * HDC302X_SENSOR_POWER_MODE_0
42 * HDC302X_SENSOR_POWER_MODE_1
43 * HDC302X_SENSOR_POWER_MODE_2
44 * HDC302X_SENSOR_POWER_MODE_3
45 *
46 * See datasheet for more info on different modes.
47 */
49
50 /* Sensor Automatic Measurement Mode
51 * Can only be set to one of the following values:
52 *
53 * HDC302X_SENSOR_MEAS_INTERVAL_MANUAL,
54 * HDC302X_SENSOR_MEAS_INTERVAL_0_5,
55 * HDC302X_SENSOR_MEAS_INTERVAL_1,
56 * HDC302X_SENSOR_MEAS_INTERVAL_2,
57 * HDC302X_SENSOR_MEAS_INTERVAL_4,
58 * HDC302X_SENSOR_MEAS_INTERVAL_10,
59 */
61 /* Sensor status register */
63 /* Sensor heater level */
64 SENSOR_ATTR_HEATER_LEVEL, /* Heater level (0-14) */
65};
66
75
78 HDC302X_SENSOR_MEAS_INTERVAL_0_5, /* 1 Measurement per 2 Seconds */
79 HDC302X_SENSOR_MEAS_INTERVAL_1, /* 1 Measurement per Second */
80 HDC302X_SENSOR_MEAS_INTERVAL_2, /* 2 Measurements per Second */
81 HDC302X_SENSOR_MEAS_INTERVAL_4, /* 4 Measurements per Second */
82 HDC302X_SENSOR_MEAS_INTERVAL_10, /* 10 Measurements per Second */
83
85};
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_HDC302X_H_ */
Main header file for I2C (Inter-Integrated Circuit) driver API.
@ SENSOR_ATTR_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:383
Main header file for sensor driver API.
sensor_power_mode_hdc302x
Definition ti_hdc302x.h:67
@ HDC302X_SENSOR_POWER_MODE_0
Definition ti_hdc302x.h:68
@ HDC302X_SENSOR_POWER_MODE_2
Definition ti_hdc302x.h:70
@ HDC302X_SENSOR_POWER_MODE_3
Definition ti_hdc302x.h:71
@ HDC302X_SENSOR_POWER_MODE_1
Definition ti_hdc302x.h:69
@ HDC302X_SENSOR_POWER_MODE_MAX
Definition ti_hdc302x.h:73
sensor_measurement_interval_hdc302x
Definition ti_hdc302x.h:76
@ HDC302X_SENSOR_MEAS_INTERVAL_1
Definition ti_hdc302x.h:79
@ HDC302X_SENSOR_MEAS_INTERVAL_MAX
Definition ti_hdc302x.h:84
@ HDC302X_SENSOR_MEAS_INTERVAL_0_5
Definition ti_hdc302x.h:78
@ HDC302X_SENSOR_MEAS_INTERVAL_10
Definition ti_hdc302x.h:82
@ HDC302X_SENSOR_MEAS_INTERVAL_MANUAL
Definition ti_hdc302x.h:77
@ HDC302X_SENSOR_MEAS_INTERVAL_2
Definition ti_hdc302x.h:80
@ HDC302X_SENSOR_MEAS_INTERVAL_4
Definition ti_hdc302x.h:81
sensor_attribute_hdc302x
Definition ti_hdc302x.h:37
@ SENSOR_ATTR_HEATER_LEVEL
Definition ti_hdc302x.h:64
@ SENSOR_ATTR_POWER_MODE
Definition ti_hdc302x.h:48
@ SENSOR_ATTR_STATUS_REGISTER
Definition ti_hdc302x.h:62
@ SENSOR_ATTR_INTEGRATION_TIME
Definition ti_hdc302x.h:60