mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 10:43:29 +00:00
machine/samd21: move definitions for I2C interfaces into board files, since pin connections on each SAMD21-based board implementation can differ
Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
package machine
|
||||
|
||||
import "device/sam"
|
||||
|
||||
// GPIO Pins
|
||||
const (
|
||||
D0 = PB09
|
||||
@@ -68,3 +70,9 @@ const (
|
||||
SDA_PIN = PA00 // SDA: SERCOM3/PAD[0]
|
||||
SCL_PIN = PA01 // SCL: SERCOM3/PAD[1]
|
||||
)
|
||||
|
||||
// I2C on the Circuit Playground Express.
|
||||
var (
|
||||
I2C0 = I2C{Bus: sam.SERCOM5_I2CM} // external device
|
||||
I2C1 = I2C{Bus: sam.SERCOM1_I2CM} // internal device
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user