1 /*
2  * Copyright (c) 2016 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_DRIVERS_SENSOR_TI_HDC_TI_HDC_H_
8 #define ZEPHYR_DRIVERS_SENSOR_TI_HDC_TI_HDC_H_
9 
10 #include <zephyr/kernel.h>
11 
12 #define TI_HDC_REG_TEMP	0x0
13 #define TI_HDC_REG_HUMIDITY	0x1
14 #define TI_HDC_REG_MANUFID	0xFE
15 #define TI_HDC_REG_DEVICEID	0xFF
16 
17 #define TI_HDC_MANUFID	0x5449
18 #define TI_HDC1050_DEVID	0x1050
19 #define TI_HDC1000_DEVID	0x1000
20 
21 /* For 14bit conversion RH needs 6.5ms and Temp 6.35ms */
22 #define HDC_CONVERSION_TIME     13
23 
24 struct ti_hdc_config {
25 	struct i2c_dt_spec i2c;
26 	struct gpio_dt_spec drdy;
27 };
28 
29 struct ti_hdc_data {
30 	uint16_t t_sample;
31 	uint16_t rh_sample;
32 
33 	struct gpio_callback gpio_cb;
34 	struct k_sem data_sem;
35 	const struct device *dev;
36 };
37 
38 #endif
39