From d0fefabad7c84e6661f505b40dd09f9adc807d0d Mon Sep 17 00:00:00 2001 From: CTCaer Date: Tue, 11 May 2021 10:07:08 +0300 Subject: [PATCH] nyx: return unknown if SD vendor is not known TODO: Investigate which OEM/ODM makes the new Lexar SD cards. --- nyx/nyx_gui/frontend/gui_info.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nyx/nyx_gui/frontend/gui_info.c b/nyx/nyx_gui/frontend/gui_info.c index ce4c138..36628e2 100644 --- a/nyx/nyx_gui/frontend/gui_info.c +++ b/nyx/nyx_gui/frontend/gui_info.c @@ -1761,13 +1761,13 @@ static lv_res_t _create_window_sdcard_info_status(lv_obj_t *btn) // Identify manufacturer. switch (sd_storage.cid.manfid) { - case 1: + case 0x01: strcat(txt_buf, "Panasonic "); break; - case 2: + case 0x02: strcat(txt_buf, "Toshiba "); break; - case 3: + case 0x03: strcat(txt_buf, "SanDisk "); break; case 0x1B: @@ -1797,6 +1797,14 @@ static lv_res_t _create_window_sdcard_info_status(lv_obj_t *btn) case 0x82: strcat(txt_buf, "Sony "); break; + //TODO: Investigate which OEM/ODM makes these. + // case 0x9C: // LX512 SO + // case 0xAD: // LX512 LS + // strcat(txt_buf, "Lexar "); + // break; + default: + strcat(txt_buf, "Unknown "); + break; } s_printf(txt_buf + strlen(txt_buf), "(%02X)\n%c%c%c%c%c\n%c%c\n%X\n%X\n%08x\n%02d/%04d\n\n",