mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
machine: refactor pin handling to auto-detect pin mode
With this change, it's no longer necessary to set a specific pin mode: it will get autodetected in the Configure() call. Tested on an ItsyBitsy M4 with the mpu6050 example in the drivers repo.
This commit is contained in:
committed by
Ron Evans
parent
4c0ebb5b41
commit
c61657d22d
@@ -69,10 +69,10 @@ const (
|
||||
|
||||
// I2C on the ItsyBitsy M4.
|
||||
var (
|
||||
I2C0 = I2C{Bus: sam.SERCOM2_I2CM,
|
||||
SDA: SDA_PIN,
|
||||
SCL: SCL_PIN,
|
||||
PinMode: PinSERCOM}
|
||||
I2C0 = I2C{
|
||||
Bus: sam.SERCOM2_I2CM,
|
||||
SERCOM: 2,
|
||||
}
|
||||
)
|
||||
|
||||
// SPI pins
|
||||
|
||||
Reference in New Issue
Block a user