summaryrefslogtreecommitdiff
path: root/sys/modules
diff options
context:
space:
mode:
authorbrad <brad@NetBSD.org>2022-11-21 21:24:00 +0000
committerbrad <brad@NetBSD.org>2022-11-21 21:24:00 +0000
commitb73c2b020a28458ab92fe6428cb92c7451afecfb (patch)
tree0a8c0e0ba0d74f7e2f69cb7871d82927909c78e6 /sys/modules
parent82cdf4ad60ef21c4f59b923db2ed78d15d3a4719 (diff)
A driver for the Bosch BMP280 / BME280 temperature, humidity and
atmospheric pressure sensor. This is an inexpensive to moderately expensive chip available from a large number of places. The driver supports all aspects of the two chips, except for the repeating read mode which would allow for sub-second queries, such as fall detection or perhaps even as an altimeter. This driver also only supports the I2C interface and not the SPI interface. The BME280, the one with humidity, is not fully tested at this point, awaiting upon a breakout board and may not show proper humidity.
Diffstat (limited to 'sys/modules')
-rw-r--r--sys/modules/Makefile3
-rw-r--r--sys/modules/bmx280thp/Makefile11
-rw-r--r--sys/modules/bmx280thp/bmx280thp.ioconf8
3 files changed, 21 insertions, 1 deletions
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 71d27e3cbcb..1106a74e31f 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.272 2022/11/17 19:20:05 brad Exp $
+# $NetBSD: Makefile,v 1.273 2022/11/21 21:24:01 brad Exp $
.include <bsd.own.mk>
@@ -33,6 +33,7 @@ SUBDIR+= blake2s
SUBDIR+= blowfish
SUBDIR+= bpf
SUBDIR+= bpf_filter
+SUBDIR+= bmx280thp
SUBDIR+= bufq_disksort
SUBDIR+= bufq_fcfs
SUBDIR+= bufq_priocscan
diff --git a/sys/modules/bmx280thp/Makefile b/sys/modules/bmx280thp/Makefile
new file mode 100644
index 00000000000..24f88cc6e48
--- /dev/null
+++ b/sys/modules/bmx280thp/Makefile
@@ -0,0 +1,11 @@
+.include "../Makefile.inc"
+
+.PATH: ${S}/dev/i2c
+
+KMOD= bmx280thp
+IOCONF= bmx280thp.ioconf
+SRCS= bmx280.c
+
+WARNS= 3
+
+.include <bsd.kmodule.mk>
diff --git a/sys/modules/bmx280thp/bmx280thp.ioconf b/sys/modules/bmx280thp/bmx280thp.ioconf
new file mode 100644
index 00000000000..4285144f8a3
--- /dev/null
+++ b/sys/modules/bmx280thp/bmx280thp.ioconf
@@ -0,0 +1,8 @@
+ioconf bmx280thp
+
+include "conf/files"
+
+pseudo-root iic*
+
+bmx280thp* at iic? addr 0x76
+bmx280thp* at iic? addr 0x77