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

Function writeCmdReadR3

source/devices/memory/SdCardSpiBased.cpp:717–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715 */
716
717std::pair<int, R3Response> writeCmdReadR3(const SpiMasterHandle& spiMasterHandle, const uint8_t command,
718 const uint32_t argument = {}, const uint8_t crc7 = {}, const bool stuffByte = {})
719{
720 const auto ret = writeCmd(spiMasterHandle, command, argument, crc7, stuffByte);
721 if (ret != 0)
722 return {ret, {}};
723
724 return readR3(spiMasterHandle);
725}
726
727/**
728 * \brief Writes regular (CMD) command and reads R7 response to/from SD card connected via SPI.

Callers 1

executeCmd58Function · 0.85

Calls 2

writeCmdFunction · 0.85
readR3Function · 0.85

Tested by

no test coverage detected