mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-20 06:28:59 +00:00
sdcard: support thingplus-rp2040
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
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
spi machine.SPI
|
||||
spi *machine.SPI
|
||||
sckPin machine.Pin
|
||||
sdoPin machine.Pin
|
||||
sdiPin machine.Pin
|
||||
@@ -18,7 +18,6 @@ var (
|
||||
)
|
||||
|
||||
func main() {
|
||||
waitSerial()
|
||||
fmt.Printf("sdcard console\r\n")
|
||||
|
||||
led := ledPin
|
||||
@@ -42,10 +41,3 @@ func main() {
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
// Wait for user to open serial console
|
||||
func waitSerial() {
|
||||
for !machine.Serial.DTR() {
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user