Line data Source code
1 1 : /*
2 : * SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : /**
7 : * @file
8 : * @brief Header file for extended sensor API of ADLTC2990 sensor
9 : * @ingroup adltc2990_interface
10 : */
11 :
12 : #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_ADLTC2990_H_
13 : #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_ADLTC2990_H_
14 :
15 : /**
16 : * @brief Analog Devices ADLTC2990 Quad I2C Voltage, Current and Temperature Monitor
17 : * @defgroup adltc2990_interface ADLTC2990
18 : * @ingroup sensor_interface_ext
19 : * @{
20 : */
21 :
22 : #include <stdbool.h>
23 :
24 : #include <zephyr/device.h>
25 :
26 : /**
27 : * @brief Acquisition format
28 : */
29 1 : enum adltc2990_acquisition_format {
30 : /** Repeated acquisition */
31 : ADLTC2990_REPEATED_ACQUISITION,
32 : /** Single shot acquisition */
33 : ADLTC2990_SINGLE_SHOT_ACQUISITION,
34 : };
35 :
36 : /**
37 : * @brief check if adtlc2990 is busy doing conversion
38 : *
39 : * @param dev Pointer to the adltc2990 device
40 : * @param is_busy Pointer to the variable to store the busy status
41 : *
42 : * @retval 0 if successful
43 : * @retval -EIO General input / output error.
44 : */
45 1 : int adltc2990_is_busy(const struct device *dev, bool *is_busy);
46 :
47 : /**
48 : * @brief Trigger the adltc2990 to start a measurement
49 : *
50 : * @param dev Pointer to the adltc2990 device
51 : * @param format The acquisition format to be used
52 : *
53 : * @retval 0 if successful
54 : * @retval -EIO General input / output error.
55 : */
56 1 : int adltc2990_trigger_measurement(const struct device *dev,
57 : enum adltc2990_acquisition_format format);
58 :
59 : /**
60 : * @}
61 : */
62 :
63 : #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_ADLTC2990_H_ */
|