Line data Source code
1 1 : /*
2 : * Copyright (c) 2025 Croxel Inc.
3 : * Copyright (c) 2025 CogniPilot Foundation
4 : *
5 : * SPDX-License-Identifier: Apache-2.0
6 : */
7 :
8 : /**
9 : * @file
10 : * @brief Header file for BMP581 sensor Devicetree constants
11 : * @ingroup bmp581_interface
12 : */
13 :
14 : #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_BOSCH_BMP581_H_
15 : #define ZEPHYR_INCLUDE_DT_BINDINGS_BOSCH_BMP581_H_
16 :
17 : /**
18 : * @addtogroup bmp581_interface
19 : * @{
20 : */
21 :
22 : /**
23 : * @defgroup bmp581_power_modes Sensor power modes
24 : * @{
25 : */
26 1 : #define BMP581_DT_MODE_NORMAL 1 /**< NORMAL mode */
27 1 : #define BMP581_DT_MODE_FORCED 2 /**< FORCED mode */
28 1 : #define BMP581_DT_MODE_CONTINUOUS 3 /**< CONTINUOUS mode */
29 : /** @} */
30 :
31 : /**
32 : * @defgroup bmp581_output_data_rate Output data rate options
33 : * @{
34 : */
35 1 : #define BMP581_DT_ODR_240_HZ 0x00 /**< 240 Hz */
36 1 : #define BMP581_DT_ODR_218_5_HZ 0x01 /**< 218.5 Hz */
37 1 : #define BMP581_DT_ODR_199_1_HZ 0x02 /**< 199.1 Hz */
38 1 : #define BMP581_DT_ODR_179_2_HZ 0x03 /**< 179.2 Hz */
39 1 : #define BMP581_DT_ODR_160_HZ 0x04 /**< 160 Hz */
40 1 : #define BMP581_DT_ODR_149_3_HZ 0x05 /**< 149.3 Hz */
41 1 : #define BMP581_DT_ODR_140_HZ 0x06 /**< 140 Hz */
42 1 : #define BMP581_DT_ODR_129_8_HZ 0x07 /**< 129.8 Hz */
43 1 : #define BMP581_DT_ODR_120_HZ 0x08 /**< 120 Hz */
44 1 : #define BMP581_DT_ODR_110_1_HZ 0x09 /**< 110.1 Hz */
45 1 : #define BMP581_DT_ODR_100_2_HZ 0x0A /**< 100.2 Hz */
46 1 : #define BMP581_DT_ODR_89_6_HZ 0x0B /**< 89.6 Hz */
47 1 : #define BMP581_DT_ODR_80_HZ 0x0C /**< 80 Hz */
48 1 : #define BMP581_DT_ODR_70_HZ 0x0D /**< 70 Hz */
49 1 : #define BMP581_DT_ODR_60_HZ 0x0E /**< 60 Hz */
50 1 : #define BMP581_DT_ODR_50_HZ 0x0F /**< 50 Hz */
51 1 : #define BMP581_DT_ODR_45_HZ 0x10 /**< 45 Hz */
52 1 : #define BMP581_DT_ODR_40_HZ 0x11 /**< 40 Hz */
53 1 : #define BMP581_DT_ODR_35_HZ 0x12 /**< 35 Hz */
54 1 : #define BMP581_DT_ODR_30_HZ 0x13 /**< 30 Hz */
55 1 : #define BMP581_DT_ODR_25_HZ 0x14 /**< 25 Hz */
56 1 : #define BMP581_DT_ODR_20_HZ 0x15 /**< 20 Hz */
57 1 : #define BMP581_DT_ODR_15_HZ 0x16 /**< 15 Hz */
58 1 : #define BMP581_DT_ODR_10_HZ 0x17 /**< 10 Hz */
59 1 : #define BMP581_DT_ODR_5_HZ 0x18 /**< 5 Hz */
60 1 : #define BMP581_DT_ODR_4_HZ 0x19 /**< 4 Hz */
61 1 : #define BMP581_DT_ODR_3_HZ 0x1A /**< 3 Hz */
62 1 : #define BMP581_DT_ODR_2_HZ 0x1B /**< 2 Hz */
63 1 : #define BMP581_DT_ODR_1_HZ 0x1C /**< 1 Hz */
64 1 : #define BMP581_DT_ODR_0_5_HZ 0x1D /**< 0.5 Hz */
65 1 : #define BMP581_DT_ODR_0_250_HZ 0x1E /**< 0.250 Hz */
66 1 : #define BMP581_DT_ODR_0_125_HZ 0x1F /**< 0.125 Hz */
67 : /** @} */
68 :
69 : /**
70 : * @defgroup bmp581_oversampling Oversampling options.
71 : *
72 : * Valid values for temperature and pressure sensor oversampling ratio.
73 : * @{
74 : */
75 1 : #define BMP581_DT_OVERSAMPLING_1X 0x00 /**< x1 */
76 1 : #define BMP581_DT_OVERSAMPLING_2X 0x01 /**< x2 */
77 1 : #define BMP581_DT_OVERSAMPLING_4X 0x02 /**< x4 */
78 1 : #define BMP581_DT_OVERSAMPLING_8X 0x03 /**< x8 */
79 1 : #define BMP581_DT_OVERSAMPLING_16X 0x04 /**< x16 */
80 1 : #define BMP581_DT_OVERSAMPLING_32X 0x05 /**< x32 */
81 1 : #define BMP581_DT_OVERSAMPLING_64X 0x06 /**< x64 */
82 1 : #define BMP581_DT_OVERSAMPLING_128X 0x07 /**< x128 */
83 : /** @} */
84 :
85 : /**
86 : * @defgroup bmp581_iir_filter IIR Filter options.
87 : *
88 : * Valid values for temperature and pressure IIR filter coefficient.
89 : *
90 : * @f[
91 : * data_n = \frac{data_{n-1} \times filtercoefficient + data_{in}}{filtercoefficient + 1}
92 : * @f]
93 : *
94 : * where:
95 : * - @f$ data_n @f$ is the current filtered output
96 : * - @f$ data_{n-1} @f$ is the previous filtered output
97 : * - @f$ data_{in} @f$ is the current input sample
98 : * - @f$ filtercoefficient @f$ is one of the coefficient values below
99 : *
100 : * Higher coefficient values provide more filtering (smoother output) but increase response time.
101 : *
102 : * @{
103 : */
104 1 : #define BMP581_DT_IIR_FILTER_BYPASS 0x00 /**< Bypass */
105 1 : #define BMP581_DT_IIR_FILTER_COEFF_1 0x01 /**< 1 */
106 1 : #define BMP581_DT_IIR_FILTER_COEFF_3 0x02 /**< 3 */
107 1 : #define BMP581_DT_IIR_FILTER_COEFF_7 0x03 /**< 7 */
108 1 : #define BMP581_DT_IIR_FILTER_COEFF_15 0x04 /**< 15 */
109 1 : #define BMP581_DT_IIR_FILTER_COEFF_31 0x05 /**< 31 */
110 1 : #define BMP581_DT_IIR_FILTER_COEFF_63 0x06 /**< 63 */
111 1 : #define BMP581_DT_IIR_FILTER_COEFF_127 0x07 /**< 127 */
112 : /** @} */
113 :
114 : /** @} */
115 :
116 : #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_BOSCH_BMP581_H_*/
|