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:
Ron Evans
2019-03-04 17:08:52 +01:00
committed by Ayke
parent 543696eafc
commit 3538ba943c
3 changed files with 15 additions and 6 deletions
+7
View File
@@ -2,6 +2,8 @@
package machine
import "device/sam"
// GPIO Pins
const (
D0 = PA11 // UART0 RX
@@ -51,3 +53,8 @@ const (
SDA_PIN = PA22 // SDA: SERCOM3/PAD[0]
SCL_PIN = PA23 // SCL: SERCOM3/PAD[1]
)
// I2C on the ItsyBitsy M0.
var (
I2C0 = I2C{Bus: sam.SERCOM3_I2CM}
)