Skip to content

SdConfig ​

Struct

Source: SdConfig.h

Description ​

Hardware configuration for an SD card over SPI.

Plain data, passed to an SD adapter's init(): the adapter owns no pin constants and no board assumptions, so the same adapter serves any board that names its own bus and pins. Callers name the SPI peripheral and pins; -1 means "use the bus default" for that signal.

Properties ​

NameTypeDescription
spiSPIClass*SPI peripheral/bus to use (e.g. &VSPI, &HSPI, &SPI).
sckintSCK pin; -1 = bus default.
misointMISO pin; -1 = bus default.
mosiintMOSI pin; -1 = bus default.
csintChip-select pin; required on most boards.
frequencyHzuint32_tSPI clock in Hz; conservative default of 4 MHz.

Released under the MIT License.