MCPcopy Create free account
hub / github.com/DISTORTEC/distortos / writeAcmdReadR2

Function writeAcmdReadR2

source/devices/memory/SdCardSpiBased.cpp:1079–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077 */
1078
1079std::pair<int, R2Response> writeAcmdReadR2(const SpiMasterHandle& spiMasterHandle, const uint8_t command,
1080 const uint32_t argument = {}, const uint8_t crc7 = {}, const bool stuffByte = {})
1081{
1082 const auto ret = writeAcmd(spiMasterHandle, command, argument, crc7, stuffByte);
1083 if (ret != 0)
1084 return {ret, {}};
1085
1086 return readR2(spiMasterHandle);
1087}
1088
1089/**
1090 * \brief Executes ACMD13 command on SD card connected via SPI.

Callers 1

executeAcmd13Function · 0.85

Calls 2

writeAcmdFunction · 0.85
readR2Function · 0.85

Tested by

no test coverage detected