| 1027 | */ |
| 1028 | |
| 1029 | int writeAcmd(const SpiMasterHandle& spiMasterHandle, const uint8_t command, const uint32_t argument = {}, |
| 1030 | const uint8_t crc7 = {}, const bool stuffByte = {}) |
| 1031 | { |
| 1032 | const auto ret = executeCmd55(spiMasterHandle); |
| 1033 | if (ret.first != 0) |
| 1034 | return ret.first; |
| 1035 | if (ret.second != 0 && ret.second != r1InIdleStateMask) |
| 1036 | return EIO; |
| 1037 | |
| 1038 | return writeCmd(spiMasterHandle, command, argument, crc7, stuffByte); |
| 1039 | } |
| 1040 | |
| 1041 | /** |
| 1042 | * \brief Writes application (ACMD) command and reads R1 response to/from SD card connected via SPI. |
no test coverage detected