first successfull tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
@ -42,7 +42,7 @@ public:
|
||||
FAIL
|
||||
};
|
||||
|
||||
using SdStatusPair = std::pair<sd::SdState, sd::SdState>;
|
||||
using SdStatePair = std::pair<sd::SdState, sd::SdState>;
|
||||
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SD_CARD_MANAGER;
|
||||
|
||||
@ -114,7 +114,7 @@ public:
|
||||
* SYSTEM_CALL_ERROR on system error
|
||||
*/
|
||||
ReturnValue_t switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard = true,
|
||||
SdStatusPair* statusPair = nullptr);
|
||||
SdStatePair* statusPair = nullptr);
|
||||
|
||||
/**
|
||||
* Switch off the specified SD card.
|
||||
@ -126,7 +126,7 @@ public:
|
||||
* SYSTEM_CALL_ERROR on system error
|
||||
*/
|
||||
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
|
||||
SdStatusPair* statusPair = nullptr);
|
||||
SdStatePair* statusPair = nullptr);
|
||||
|
||||
/**
|
||||
* Update the state file or creates one if it does not exist. You need to call this
|
||||
@ -149,7 +149,7 @@ public:
|
||||
* should call #updateSdCardStateFile again in that case
|
||||
* - STATUS_FILE_NEXISTS if the status file does not exist
|
||||
*/
|
||||
ReturnValue_t getSdCardActiveStatus(SdStatusPair& active);
|
||||
ReturnValue_t getSdCardActiveStatus(SdStatePair& active);
|
||||
|
||||
/**
|
||||
* Mount the specified SD card. This is necessary to use it.
|
||||
@ -169,13 +169,13 @@ public:
|
||||
* In case that there is a discrepancy between the preferred SD card and the currently
|
||||
* mounted one, this function will sanitize the state by attempting to mount the
|
||||
* currently preferred SD card. If the caller already has state information, it can be
|
||||
* passed into the function.
|
||||
* passed into the function. For now, this operation will be enforced in blocking mode.
|
||||
* @param statusPair Current SD card status capture with #getSdCardActiveStatus
|
||||
* @param prefSdCard Preferred SD card captured with #getPreferredSdCard
|
||||
* @throws std::bad_alloc if one of the two arguments was a nullptr and an allocation failed
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t sanitizeState(SdStatusPair* statusPair = nullptr,
|
||||
ReturnValue_t sanitizeState(SdStatePair* statusPair = nullptr,
|
||||
sd::SdCard prefSdCard = sd::SdCard::NONE);
|
||||
|
||||
/**
|
||||
@ -203,7 +203,7 @@ private:
|
||||
|
||||
ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on);
|
||||
|
||||
void processSdStatusLine(SdStatusPair& active, std::string& line, uint8_t& idx,
|
||||
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx,
|
||||
sd::SdCard& currentSd);
|
||||
|
||||
std::string currentPrefix;
|
||||
|
Reference in New Issue
Block a user