diff options
author | Ayke van Laethem <[email protected]> | 2021-02-04 19:18:49 +0100 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-02-07 14:06:49 +0100 |
commit | d6cdf8ca289487b75d6310998eba45aa56545156 (patch) | |
tree | a6c51cbfdac452b1c0db86e935d2a945b32c5b46 /src/machine/machine_generic.go | |
parent | 6c5409bd1702efd719503759f611faa6134f218f (diff) | |
download | tinygo-d6cdf8ca289487b75d6310998eba45aa56545156.tar.gz tinygo-d6cdf8ca289487b75d6310998eba45aa56545156.zip |
machine: make I2C.Configure signature consistent
It's better to always return an error value (even if it is nil) for
consistency.
Diffstat (limited to 'src/machine/machine_generic.go')
-rw-r--r-- | src/machine/machine_generic.go | 3 |
1 files changed, 2 insertions, 1 deletions
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. |