Fix Nano 33 BLE drivers (#351)

Fix HTS221, LPS22HB and APDS9960 drivers and their examples for Arduino Nano 33 BLE:

* Update hts221_nano_33_ble.go
* Update lps22hb_nano_33_ble.go
* Update apds9960_nano_33_ble.go
This commit is contained in:
Alan Wang
2021-12-20 16:57:37 +08:00
committed by GitHub
parent 43099c5d5f
commit bee7422c3a
14 changed files with 151 additions and 160 deletions
+4 -6
View File
@@ -5,10 +5,8 @@ package apds9960
import "tinygo.org/x/drivers"
// New creates a new APDS-9960 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: ADPS9960_ADDRESS, mode: MODE_NONE}
// Configure sets up the APDS-9960 device.
func (d *Device) Configure(cfg Configuration) {
// configure device
d.configureDevice(cfg)
}