From 72344b5777dd78bbad6bbc8b52c0fa271671cf90 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Tue, 4 Jun 2024 08:09:40 +1000 Subject: no more acquire_spi :) --- src/tangara/system_fsm/running.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/tangara/system_fsm/running.cpp') 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); } } -- cgit v1.2.3