1# BMP280 temperature and pressure sensor configuration options
2
3# Copyright (c) 2016 Intel Corporation
4# Copyright (c) 2017 IpTronix S.r.l.
5# Copyright (c) 2024 Croxel Inc.
6# SPDX-License-Identifier: Apache-2.0
7
8menuconfig BME280
9	bool "BME280/BMP280 sensor"
10	default y
11	depends on DT_HAS_BOSCH_BME280_ENABLED
12	select I2C if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BME280),i2c)
13	select SPI if $(dt_compat_on_bus,$(DT_COMPAT_BOSCH_BME280),spi)
14	select RTIO_WORKQ if SENSOR_ASYNC_API
15	help
16	  Enable driver for BME280 I2C-based or SPI-based temperature and pressure sensor.
17
18if BME280
19
20choice BME280_MODE
21	prompt "BME280 sampling mode"
22	default BME280_MODE_NORMAL
23	help
24	  Select sampling mode. In normal mode continuous measurements are
25	  performed, whereas in forced mode only single measurement is performed.
26config BME280_MODE_NORMAL
27	bool "normal"
28config BME280_MODE_FORCED
29	bool "forced"
30endchoice
31
32choice
33	prompt "BME280 temperature oversampling"
34	default BME280_TEMP_OVER_2X
35	help
36	  Select temperature oversampling for the BME280 sensor.  Higher values
37	  lead to more accurate readings, but higher power consumption.
38config BME280_TEMP_OVER_1X
39	bool "x1"
40config BME280_TEMP_OVER_2X
41	bool "x2"
42config BME280_TEMP_OVER_4X
43	bool "x4"
44config BME280_TEMP_OVER_8X
45	bool "x8"
46config BME280_TEMP_OVER_16X
47	bool "x16"
48endchoice
49
50choice
51	prompt "BME280 pressure oversampling"
52	default BME280_PRESS_OVER_16X
53	help
54	  Select pressure oversampling for the BME280 sensor.  Higher values
55	  lead to more accurate readings, but higher power consumption.
56config BME280_PRESS_OVER_1X
57	bool "x1"
58config BME280_PRESS_OVER_2X
59	bool "x2"
60config BME280_PRESS_OVER_4X
61	bool "x4"
62config BME280_PRESS_OVER_8X
63	bool "x8"
64config BME280_PRESS_OVER_16X
65	bool "x16"
66endchoice
67
68choice
69	prompt "BME280 humidity oversampling"
70	default BME280_HUMIDITY_OVER_16X
71	help
72	  Select humidity oversampling for the BME280 sensor.  Higher values
73	  lead to more accurate readings, but higher power consumption.
74config BME280_HUMIDITY_OVER_1X
75	bool "x1"
76config BME280_HUMIDITY_OVER_2X
77	bool "x2"
78config BME280_HUMIDITY_OVER_4X
79	bool "x4"
80config BME280_HUMIDITY_OVER_8X
81	bool "x8"
82config BME280_HUMIDITY_OVER_16X
83	bool "x16"
84endchoice
85
86choice
87	prompt "BME280 standby time"
88	default BME280_STANDBY_1000MS
89	help
90	  Select standby time between measurements for the BME280 sensor.
91	  Higher values lead to lower power consumption.
92config BME280_STANDBY_05MS
93	bool "0.5ms"
94config BME280_STANDBY_62MS
95	bool "62.5ms"
96config BME280_STANDBY_125MS
97	bool "125ms"
98config BME280_STANDBY_250MS
99	bool "250ms"
100config BME280_STANDBY_500MS
101	bool "500ms"
102config BME280_STANDBY_1000MS
103	bool "1000ms"
104config BME280_STANDBY_2000MS
105	bool "2000ms BMP280 / 10ms BME280"
106config BME280_STANDBY_4000MS
107	bool "4000ms BMP280 / 20ms BME280"
108endchoice
109
110choice
111	prompt "BME280 filter coefficient"
112	default BME280_FILTER_4
113	help
114	  Select the filter coefficient for the BME280 sensor.
115config BME280_FILTER_OFF
116	bool "filter off"
117config BME280_FILTER_2
118	bool "2"
119config BME280_FILTER_4
120	bool "4"
121config BME280_FILTER_8
122	bool "8"
123config BME280_FILTER_16
124	bool "16"
125endchoice
126
127endif # BME280
128