Skip to content

Commit 64cc314

Browse files
committed
Define fileSystemState separate for more clarity.
1 parent 7585737 commit 64cc314

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/storage/storage.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static constexpr std::uint16_t blockSize = 512; // Should be 512
2626
static const esp_partition_t *partition = nullptr;
2727
static const char *const TAG = "STORAGE";
2828

29-
static class ReadyCondition
29+
class ReadyCondition
3030
{
3131
public:
3232
void setReady(const bool new_state)
@@ -48,7 +48,9 @@ static class ReadyCondition
4848
private:
4949
mutable std::condition_variable conditionVariable;
5050
std::atomic<bool> ready;
51-
} fileSystemState;
51+
};
52+
53+
static ReadyCondition fileSystemState;
5254

5355
/**
5456
* Callback invoked when received WRITE10 command.
@@ -127,7 +129,7 @@ static void listFiles(const char *const dirname)
127129
static void switchToApplicationMode()
128130
{
129131
usbMsc.mediaPresent(false);
130-
FFat.end(); // invalidate cache
132+
FFat.end(); // invalidate cache
131133
assert(FFat.begin()); // update data
132134
fileSystemState.setReady(true);
133135
}

0 commit comments

Comments
 (0)