Closed oflebbe closed 2 years ago
This needs restructuring the sdcard API to take a pointer to the SPI interface rather the SPI type itself.
This is a good thing anyhow. Most of the other SPI devices are using the drivers.SPI
interface. The only reason the SD care does not (yet?) is because supporting Configure()
was not quite as simple, and the SDCard driver needs that to reconfigure the interface to kick up to high-speed.
So in short, this seems like a fine change to make.
Maybe it would be simpler to simply remove waiting for serial line to come alive ?
I am in favor of removing that code as well.
Updated PR
Thank you for the contribution @oflebbe and for the review @sago35 now merging.
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.
A different issue is the Serial.DTR signal to be used in the example code. The current UART code does not implement the modem control signals. Here is a workaround for not having this functionality. Maybe it would be simpler to simply remove waiting for serial line to come alive ?