aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/machine/board_pygamer.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-02-06 12:37:15 +0100
committerRon Evans <[email protected]>2021-03-29 02:02:04 +0200
commit90b42799a2a91f6614ea86e8650d5fa303bc10b2 (patch)
treec98d7a684da7c5845571ce06c92d12ed320e243b /src/machine/board_pygamer.go
parent71bbe93ab2e482239fbab790a83c528bc077d74e (diff)
downloadtinygo-90b42799a2a91f6614ea86e8650d5fa303bc10b2.tar.gz
tinygo-90b42799a2a91f6614ea86e8650d5fa303bc10b2.zip
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.
Diffstat (limited to 'src/machine/board_pygamer.go')
-rw-r--r--src/machine/board_pygamer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/machine/board_pygamer.go b/src/machine/board_pygamer.go
index 5743ec95d..7e5c08e7e 100644
--- a/src/machine/board_pygamer.go
+++ b/src/machine/board_pygamer.go
@@ -99,7 +99,7 @@ const (
// I2C on the PyGamer.
var (
- I2C0 = I2C{
+ I2C0 = &I2C{
Bus: sam.SERCOM2_I2CM,
SERCOM: 2,
}