mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
90b42799a2
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.
13 lines
135 B
Go
13 lines
135 B
Go
// +build fe310,hifive1b
|
|
|
|
package machine
|
|
|
|
import "device/sifive"
|
|
|
|
// SPI on the HiFive1.
|
|
var (
|
|
SPI1 = SPI{
|
|
Bus: sifive.QSPI1,
|
|
}
|
|
)
|