Line data Source code
1 1 : /*
2 : * Copyright (c) 2022 Badgerd Technologies B.V.
3 : *
4 : * SPDX-License-Identifier: Apache-2.0
5 : *
6 : * Driver is developed to be used with Zephyr. And it only supports i2c interface.
7 : *
8 : * Author: Talha Can Havadar <havadartalha@gmail.com>
9 : *
10 : */
11 :
12 : /**
13 : * @file
14 : * @brief Header file for extended sensor API of BMP581 sensor
15 : * @ingroup bmp581_interface
16 : */
17 :
18 : #ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_
19 : #define ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_
20 :
21 : /**
22 : * @brief Bosch BMP581 Barometric pressure sensor
23 : * @defgroup bmp581_interface BMP581
24 : * @ingroup sensor_interface_ext
25 : * @{
26 : */
27 :
28 : #include <zephyr/drivers/sensor.h>
29 : #include <zephyr/dt-bindings/sensor/bmp581.h>
30 :
31 : /* Custom ATTR values */
32 :
33 : /* This is used to enable IIR config,
34 : * keep in mind that disabling IIR back in runtime is not
35 : * supported yet
36 : */
37 :
38 : /**
39 : * @brief IIR configuration for pressure and temperature channels
40 : *
41 : * sensor_value.val1 is the IIR filter coefficient for temperature.
42 : * sensor_value.val2 is the IIR filter coefficient for pressure.
43 : *
44 : * See @ref bmp581_iir_filter for the valid values.
45 : */
46 1 : #define BMP5_ATTR_IIR_CONFIG (SENSOR_ATTR_PRIV_START + 1u)
47 : /**
48 : * @brief Power mode
49 : *
50 : * The attribute value should be a @ref bmp5_powermode enum value.
51 : */
52 1 : #define BMP5_ATTR_POWER_MODE (SENSOR_ATTR_PRIV_START + 2u)
53 :
54 : /**
55 : * @brief BMP581 power modes
56 : */
57 1 : enum bmp5_powermode {
58 : /*! Standby powermode */
59 : BMP5_POWERMODE_STANDBY,
60 : /*! Normal powermode */
61 : BMP5_POWERMODE_NORMAL,
62 : /*! Forced powermode */
63 : BMP5_POWERMODE_FORCED,
64 : /*! Continuous powermode */
65 : BMP5_POWERMODE_CONTINUOUS,
66 : /*! Deep standby powermode */
67 : BMP5_POWERMODE_DEEP_STANDBY
68 : };
69 :
70 : /**
71 : * @}
72 : */
73 :
74 : #endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_BMP581_USER_H_ */
|