machine: make machine.I2C0 and similar objects pointers

This makes it possible to assign I2C objects (machine.I2C0,
machine.I2C1, etc.) without needing to take a pointer.

This is important especially in the future when I2C may be driven using
DMA and the machine.I2C type needs to store some state.
This commit is contained in:
Ayke van Laethem
2021-02-06 12:37:15 +01:00
committed by Ron Evans
parent 71bbe93ab2
commit 90b42799a2
41 changed files with 129 additions and 136 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ const (
// I2C on the QT Py M0.
var (
I2C0 = I2C{
I2C0 = &I2C{
Bus: sam.SERCOM2_I2CM,
SERCOM: 2,
}