distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
SdCard class implementation. More...
#include "distortos/devices/memory/SdCard.hpp"
#include "distortos/assert.h"
#include "distortos/ThisThread.hpp"
#include "estd/EnumClassFlags.hpp"
#include "estd/extractBitField.hpp"
#include "estd/ScopeGuard.hpp"
#include <mutex>
Namespaces | |
distortos | |
Top-level namespace of distortos project. | |
distortos::devices | |
Device drivers. | |
estd | |
Collection of useful templates. | |
Typedefs | |
using | distortos::devices::anonymous_namespace{SdCard.cpp}::ShortResponse = std::array< uint32_t, 1 > |
alias for short response More... | |
using | distortos::devices::anonymous_namespace{SdCard.cpp}::LongResponse = std::array< uint32_t, 4 > |
alias for long response More... | |
using | distortos::devices::anonymous_namespace{SdCard.cpp}::Result = SdMmcCardBase::Result |
import SdMmcCardBase::Result as Result More... | |
Functions | |
void | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithoutResponse (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument) |
Executes transaction with command that has no response. More... | |
std::pair< Result, ShortResponse > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithShortResponse (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has short response. More... | |
std::pair< Result, LongResponse > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithLongResponse (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has long response. More... | |
int | distortos::devices::anonymous_namespace{SdCard.cpp}::resultToErrorCode (const Result result) |
Converts result of transaction to error code. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithR1Response (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has R1 response. More... | |
std::pair< int, R2Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithR2Response (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has R2 response. More... | |
std::pair< int, R3Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithR3Response (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has R3 response. More... | |
std::pair< int, R6Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithR6Response (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has R6 response. More... | |
std::pair< int, R7Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmdWithR7Response (SynchronousSdMmcCardLowLevel &sdCard, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with command that has R7 response. More... | |
void | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd0 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD0 command on SD card. More... | |
std::pair< int, Cid > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd2 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD2 command on SD card. More... | |
std::pair< int, R6Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd3 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD3 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd7 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca) |
Executes CMD7 command on SD card. More... | |
std::pair< int, bool > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd8 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD8 command on SD card. More... | |
std::pair< int, Csd > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd9 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca) |
Executes CMD9 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd12 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD12 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd13 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca) |
Executes CMD13 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd16 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t blockLength) |
Executes CMD16 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd17 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address, const SdMmcCardLowLevel::ReadTransfer readTransfer) |
Executes CMD17 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd18 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address, const SdMmcCardLowLevel::ReadTransfer readTransfer) |
Executes CMD18 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd24 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address, const SdMmcCardLowLevel::WriteTransfer writeTransfer) |
Executes CMD24 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd25 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address, const SdMmcCardLowLevel::WriteTransfer writeTransfer) |
Executes CMD25 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd32 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address) |
Executes CMD32 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd33 (SynchronousSdMmcCardLowLevel &sdCard, const uint32_t address) |
Executes CMD33 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd38 (SynchronousSdMmcCardLowLevel &sdCard) |
Executes CMD38 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeCmd55 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca) |
Executes CMD55 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmdWithR1Response (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with application command (ACMD) that has R1 response. More... | |
std::pair< int, R3Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmdWithR3Response (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const uint8_t command, const uint32_t argument, const SdMmcCardLowLevel::Transfer transfer) |
Executes transaction with application command (ACMD) that has R3 response. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmd6 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const bool _4BitBusMode) |
Executes ACMD6 command on SD card. More... | |
std::tuple< int, R1Response, SdStatus > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmd13 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const uint16_t timeoutMs) |
Executes ACMD13 command on SD card. More... | |
std::pair< int, R1Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmd23 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const uint32_t blocksCount) |
Executes ACMD23 command on SD card. More... | |
std::pair< int, R3Response > | distortos::devices::anonymous_namespace{SdCard.cpp}::executeAcmd41 (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const bool hcs, const bool xpc, const bool s18r, const uint32_t vddVoltageWindow) |
Executes ACMD41 command on SD card. More... | |
int | distortos::devices::anonymous_namespace{SdCard.cpp}::waitForTransferState (SynchronousSdMmcCardLowLevel &sdCard, const uint16_t rca, const TickClock::time_point timePoint) |
Waits until card goes back to transfer (tran) state. More... | |
SdCard class implementation.