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

Function writeAcmdReadR1

source/devices/memory/SdCardSpiBased.cpp:1055–1063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1053 */
1054
1055std::pair<int, uint8_t> writeAcmdReadR1(const SpiMasterHandle& spiMasterHandle, const uint8_t command,
1056 const uint32_t argument = {}, const uint8_t crc7 = {}, const bool stuffByte = {})
1057{
1058 const auto ret = writeAcmd(spiMasterHandle, command, argument, crc7, stuffByte);
1059 if (ret != 0)
1060 return {ret, {}};
1061
1062 return readR1(spiMasterHandle);
1063}
1064
1065/**
1066 * \brief Writes application (ACMD) command and reads R2 response to/from SD card connected via SPI.

Callers 2

executeAcmd23Function · 0.85
executeAcmd41Function · 0.85

Calls 2

writeAcmdFunction · 0.85
readR1Function · 0.85

Tested by

no test coverage detected