Add support for LPS22HB MEMS nano pressure sensor (#297)

lps22hb: add support for lps22hb
This commit is contained in:
Alan Wang
2021-11-06 18:14:21 +08:00
committed by GitHub
parent 76ff632134
commit 82e9e4a7f3
6 changed files with 171 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
//go:build !nano_33_ble
// +build !nano_33_ble
package lps22hb
import "tinygo.org/x/drivers"
// New creates a new LPS22HB connection. The I2C bus must already be
// configured.
//
// This function only creates the Device object, it does not touch the device.
func New(bus drivers.I2C) Device {
return Device{bus: bus, Address: LPS22HB_ADDRESS}
}