From ecbdfe379eff877684622e170065aabc961d997a Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 17 Nov 2020 08:25:50 -0500 Subject: [PATCH] docs --- firmware/hw_layer/mmc_card.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index b3361b05da..8fdd3b42de 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -51,6 +51,11 @@ static int writeCounter = 0; static int totalWritesCounter = 0; static int totalSyncCounter = 0; +/** + * on't re-read SD card spi device after boot - it could change mid transaction (TS thread could preempt), + * which will cause disaster (usually multiple-unlock of the same mutex in UNLOCK_SD_SPI) + */ + spi_device_e mmcSpiDevice = SPI_NONE; #define LOG_INDEX_FILENAME "index.txt"