mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-26 01:19:02 +00:00
all: use New() constructor function for simplicity
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
+2
-2
@@ -15,11 +15,11 @@ type Device struct {
|
||||
bus machine.I2C
|
||||
}
|
||||
|
||||
// NewI2C creates a new MPU6050 connection. The I2C bus must already be
|
||||
// New creates a new MPU6050 connection. The I2C bus must already be
|
||||
// configured.
|
||||
//
|
||||
// This function only creates the Device object, it does not touch the device.
|
||||
func NewI2C(bus machine.I2C) Device {
|
||||
func New(bus machine.I2C) Device {
|
||||
return Device{bus}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user