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:
Olaf Flebbe
2022-04-24 21:06:27 +02:00
committed by Ron Evans
parent ec00fdef9b
commit 9f6783670f
19 changed files with 54 additions and 35 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ var (
)
type Device struct {
bus machine.SPI
bus *machine.SPI
sck machine.Pin
sdo machine.Pin
sdi machine.Pin
@@ -41,7 +41,7 @@ type Device struct {
CSD *CSD
}
func New(b machine.SPI, sck, sdo, sdi, cs machine.Pin) Device {
func New(b *machine.SPI, sck, sdo, sdi, cs machine.Pin) Device {
return Device{
bus: b,
cs: cs,