sd card is now mounted as well
This commit is contained in:
@ -39,9 +39,18 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
|
||||
return result;
|
||||
}
|
||||
if(sdCard == sd::SdCard::SLOT_0) {
|
||||
if(active.first == sd::SdStatus::ON or active.first == sd::SdStatus::MOUNTED) {
|
||||
return ALREADY_ON;
|
||||
if(active.first == sd::SdStatus::MOUNTED) {
|
||||
return ALREADY_MOUNTED;
|
||||
}
|
||||
else if(active.first == sd::SdStatus::ON) {
|
||||
if(not doMountSdCard) {
|
||||
return ALREADY_ON;
|
||||
}
|
||||
else {
|
||||
return mountSdCard(sdCard);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if(sdCard == sd::SdCard::SLOT_1) {
|
||||
if(active.second == sd::SdStatus::ON or active.second == sd::SdStatus::MOUNTED) {
|
||||
|
Reference in New Issue
Block a user