aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/machine.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-09-30 14:21:52 +0200
committerRon Evans <[email protected]>2019-10-07 17:25:49 +0200
commitd266e44bc50c02f2049086e45900611f4ad53bb2 (patch)
treee5cb852b8ca31e746532feb7856071b5ac59cbad /src/machine/machine.go
parent8fe126b1f6a87d62cb5e9b5cbef17b209019c0d3 (diff)
downloadtinygo-d266e44bc50c02f2049086e45900611f4ad53bb2.tar.gz
tinygo-d266e44bc50c02f2049086e45900611f4ad53bb2.zip
machine/samd21: use pins specified in I2CConfig
Instead of configuring machine.I2C0, machine.I2C1, etc. statically, allow the pins to be set using machine.I2CConfig. This will also automatically configure the correct pin mode for each pin instead of having to specify that manually.
Diffstat (limited to 'src/machine/machine.go')
-rw-r--r--src/machine/machine.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/machine/machine.go b/src/machine/machine.go
index e55b522d5..a7863d8ff 100644
--- a/src/machine/machine.go
+++ b/src/machine/machine.go
@@ -5,6 +5,8 @@ import "errors"
var (
ErrInvalidInputPin = errors.New("machine: invalid input pin")
ErrInvalidOutputPin = errors.New("machine: invalid output pin")
+ ErrInvalidClockPin = errors.New("machine: invalid clock pin")
+ ErrInvalidDataPin = errors.New("machine: invalid data pin")
)
type PinConfig struct {