From 0099b7ce105a8c5fbff8b1ceb0a41513d2e87fa8 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 3 Apr 2021 19:42:54 -0400 Subject: [PATCH] explicit status for MSD SD mode --- firmware/hw_layer/mmc_card.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/hw_layer/mmc_card.cpp b/firmware/hw_layer/mmc_card.cpp index 9fa50b8147..471d26c89a 100644 --- a/firmware/hw_layer/mmc_card.cpp +++ b/firmware/hw_layer/mmc_card.cpp @@ -38,8 +38,10 @@ #define SD_STATE_SEEK_FAILED "SEEK_FAILED" #define SD_STATE_NOT_INSERTED "NOT_INSERTED" #define SD_STATE_CONNECTING "CONNECTING" +#define SD_STATE_MSD "MSD" #define SD_STATE_NOT_CONNECTED "NOT_CONNECTED" +// todo: shall we migrate to enum with enum2string for consistency? maybe not until we start reading sdStatus? static const char *sdStatus = SD_STATE_INIT; static bool fs_ready = false; @@ -431,6 +433,7 @@ static bool mountMmc() { // Mount the real card to USB msdStart(&USBMSD1, usb_driver, cardBlockDevice, blkbuf, &scsi_inquiry_response, NULL); + sdStatus = SD_STATE_MSD; // At this point we're done: don't try to write files ourselves return false; } else {