mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 11:13:27 +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
@@ -118,10 +118,10 @@ const (
|
||||
|
||||
// I2C on the PyPortal.
|
||||
var (
|
||||
I2C0 = I2C{Bus: sam.SERCOM5_I2CM,
|
||||
SDA: SDA_PIN,
|
||||
SCL: SCL_PIN,
|
||||
PinMode: PinSERCOMAlt}
|
||||
I2C0 = I2C{
|
||||
Bus: sam.SERCOM5_I2CM,
|
||||
SERCOM: 5,
|
||||
}
|
||||
)
|
||||
|
||||
// SPI pins
|
||||
|
||||
Reference in New Issue
Block a user