diff options
-rw-r--r-- | apps/debug_menu.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index d106632a1b..20dbf76b66 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1607,6 +1607,11 @@ static bool view_battery(void) | |||
1607 | 1607 | ||
1608 | #ifndef SIMULATOR | 1608 | #ifndef SIMULATOR |
1609 | #if defined(HAVE_MMC) || defined(HAVE_HOTSWAP) | 1609 | #if defined(HAVE_MMC) || defined(HAVE_HOTSWAP) |
1610 | #if defined(HAVE_MMC) | ||
1611 | #define CARDTYPE "MMC" | ||
1612 | #else | ||
1613 | #define CARDTYPE "microSD" | ||
1614 | #endif | ||
1610 | static int cardinfo_lines = 0, | 1615 | static int cardinfo_lines = 0, |
1611 | current_card = 1; /* the first call changes this card to 0 */ | 1616 | current_card = 1; /* the first call changes this card to 0 */ |
1612 | static int cardinfo_callback(int btn, struct gui_synclist *lists) | 1617 | static int cardinfo_callback(int btn, struct gui_synclist *lists) |
@@ -1648,7 +1653,7 @@ static int cardinfo_callback(int btn, struct gui_synclist *lists) | |||
1648 | (int) card_extract_bits(card->cid, 8, 16)); | 1653 | (int) card_extract_bits(card->cid, 8, 16)); |
1649 | int temp = card_extract_bits(card->csd, 2, 4); | 1654 | int temp = card_extract_bits(card->csd, 2, 4); |
1650 | snprintf(debug_list_messages[cardinfo_lines++], DEBUG_MSG_LEN, | 1655 | snprintf(debug_list_messages[cardinfo_lines++], DEBUG_MSG_LEN, |
1651 | "MMC v%s", temp < 5 ? | 1656 | CARDTYPE " v%s", temp < 5 ? |
1652 | spec_vers[temp] : "?.?"); | 1657 | spec_vers[temp] : "?.?"); |
1653 | snprintf(debug_list_messages[cardinfo_lines++], DEBUG_MSG_LEN, | 1658 | snprintf(debug_list_messages[cardinfo_lines++], DEBUG_MSG_LEN, |
1654 | "Blocks: 0x%06lx", card->numblocks); | 1659 | "Blocks: 0x%06lx", card->numblocks); |
@@ -1685,7 +1690,7 @@ static int cardinfo_callback(int btn, struct gui_synclist *lists) | |||
1685 | if (lists) | 1690 | if (lists) |
1686 | { | 1691 | { |
1687 | snprintf(listtitle, sizeof listtitle, | 1692 | snprintf(listtitle, sizeof listtitle, |
1688 | "[MMC/microSD %d]", current_card); | 1693 | "[" CARDTYPE " %d]", current_card); |
1689 | gui_synclist_set_title(lists, listtitle, NOICON); | 1694 | gui_synclist_set_title(lists, listtitle, NOICON); |
1690 | gui_synclist_select_item(lists, 0); | 1695 | gui_synclist_select_item(lists, 0); |
1691 | gui_synclist_set_nb_items(lists, cardinfo_lines); | 1696 | gui_synclist_set_nb_items(lists, cardinfo_lines); |
@@ -1698,7 +1703,7 @@ static bool dbg_disk_info(void) | |||
1698 | { | 1703 | { |
1699 | current_card = 1; /* the callback changes this to 0 */ | 1704 | current_card = 1; /* the callback changes this to 0 */ |
1700 | cardinfo_callback(ACTION_STD_OK, 0); | 1705 | cardinfo_callback(ACTION_STD_OK, 0); |
1701 | dbg_list("[MMC/microSD 0]", cardinfo_lines, 1, | 1706 | dbg_list("[" CARDTYPE " 0]", cardinfo_lines, 1, |
1702 | cardinfo_callback, dbg_listmessage_getname); | 1707 | cardinfo_callback, dbg_listmessage_getname); |
1703 | return false; | 1708 | return false; |
1704 | } | 1709 | } |
@@ -1943,6 +1948,7 @@ int radio_lines = 0; | |||
1943 | static int radio_callback(int btn, struct gui_synclist *lists) | 1948 | static int radio_callback(int btn, struct gui_synclist *lists) |
1944 | { | 1949 | { |
1945 | (void)btn; (void)lists; | 1950 | (void)btn; (void)lists; |
1951 | radio_lines = 0; | ||
1946 | if (radio_hardware_present()) | 1952 | if (radio_hardware_present()) |
1947 | { | 1953 | { |
1948 | snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, | 1954 | snprintf(debug_list_messages[radio_lines++], DEBUG_MSG_LEN, |