Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-12-20 18:13:36 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-12-20 18:13:36 +0300
commit9601e42dec2b9292c8b43f41b4ad89d99a238655 (patch)
treef986d6a1ac568529195448da0741f23cdfa09a18 /src/Storage/MassStorage.cpp
parentb161d60fd7ef765b7ea91cdad3b5e24eea5b3ad7 (diff)
Initialise fsMutex in Duet 2 SBC buildv3-wilriker
Diffstat (limited to 'src/Storage/MassStorage.cpp')
-rw-r--r--src/Storage/MassStorage.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Storage/MassStorage.cpp b/src/Storage/MassStorage.cpp
index dbb8c7db..e56f5c74 100644
--- a/src/Storage/MassStorage.cpp
+++ b/src/Storage/MassStorage.cpp
@@ -261,13 +261,19 @@ static const char* TranslateCardError(sd_mmc_err_t err) noexcept
}
}
+#endif
+
+#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
+
void MassStorage::Init() noexcept
{
+ fsMutex.Create("FileSystem");
+
+# if HAS_MASS_STORAGE
static const char * const VolMutexNames[] = { "SD0", "SD1" };
static_assert(ARRAY_SIZE(VolMutexNames) >= NumSdCards, "Incorrect VolMutexNames array");
// Create the mutexes
- fsMutex.Create("FileSystem");
dirMutex.Create("DirSearch");
freeWriteBuffers = nullptr;
@@ -293,10 +299,9 @@ void MassStorage::Init() noexcept
sd_mmc_init(SdWriteProtectPins, SdSpiCSPins); // initialize SD MMC stack
// We no longer mount the SD card here because it may take a long time if it fails
+# endif
}
-#endif
-#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
FileStore* MassStorage::OpenFile(const char* filePath, OpenMode mode, uint32_t preAllocSize) noexcept
{
{