diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-06-04 08:09:40 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-06-04 08:09:40 +1000 |
| commit | 72344b5777dd78bbad6bbc8b52c0fa271671cf90 (patch) | |
| tree | e060c1a54cafed5c8c0cd5974250e8fab95e3349 /src/tangara/system_fsm/running.cpp | |
| parent | 39460931d8e3d044f00f7a4f58b44b1035338f09 (diff) | |
| download | tangara-fw-72344b5777dd78bbad6bbc8b52c0fa271671cf90.tar.gz | |
no more acquire_spi :)
Diffstat (limited to 'src/tangara/system_fsm/running.cpp')
| -rw-r--r-- | src/tangara/system_fsm/running.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/tangara/system_fsm/running.cpp b/src/tangara/system_fsm/running.cpp index ac36ec64..c808e9da 100644 --- a/src/tangara/system_fsm/running.cpp +++ b/src/tangara/system_fsm/running.cpp @@ -82,22 +82,14 @@ void Running::react(const SdDetectChanged& ev) { // supriously. FIXME: Why? // Instead, check whether or not the card has actually gone away. if (sStorage) { - FRESULT res; FF_DIR dir; - { - auto lock = drivers::acquire_spi(); - res = f_opendir(&dir, "/"); - } - + FRESULT res = f_opendir(&dir, "/"); if (res != FR_OK) { ESP_LOGW(kTag, "sd card ejected unsafely!"); unmountStorage(); } - { - auto lock = drivers::acquire_spi(); - f_closedir(&dir); - } + f_closedir(&dir); } } |
