mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-04 23:17:47 +00:00
9f6783670f
The instances of SPI interfaces SPI0, SPI1, ... are pointers to SPI types on rp2040 machines, rather plain values like other machines. This needs restructuring the sdcard API to take a pointer to the SPI interface rather the SPI type itself. Removed waitserial() since it needs modem control lines not available on most boards
19 lines
325 B
Go
19 lines
325 B
Go
//go:build feather_m4 || feather_m4_can || feather_nrf52840
|
|
// +build feather_m4 feather_m4_can feather_nrf52840
|
|
|
|
package main
|
|
|
|
import (
|
|
"machine"
|
|
)
|
|
|
|
func init() {
|
|
spi = &machine.SPI0
|
|
sckPin = machine.SPI0_SCK_PIN
|
|
sdoPin = machine.SPI0_SDO_PIN
|
|
sdiPin = machine.SPI0_SDI_PIN
|
|
csPin = machine.D10
|
|
|
|
ledPin = machine.LED
|
|
}
|