From d6cdf8ca289487b75d6310998eba45aa56545156 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Thu, 4 Feb 2021 19:18:49 +0100 Subject: machine: make I2C.Configure signature consistent It's better to always return an error value (even if it is nil) for consistency. --- src/machine/machine_generic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/machine/machine_generic.go') diff --git a/src/machine/machine_generic.go b/src/machine/machine_generic.go index 65be3c96e..e78e257e8 100644 --- a/src/machine/machine_generic.go +++ b/src/machine/machine_generic.go @@ -115,8 +115,9 @@ type I2CConfig struct { } // Configure is intended to setup the I2C interface. -func (i2c I2C) Configure(config I2CConfig) { +func (i2c I2C) Configure(config I2CConfig) error { i2cConfigure(i2c.Bus, config.SCL, config.SDA) + return nil } // Tx does a single I2C transaction at the specified address. -- cgit v1.2.3