mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
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.
This commit is contained in:
committed by
Ron Evans
parent
8fe126b1f6
commit
d266e44bc5
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user