Skip to content

Commit

Permalink
- Show bus speed mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Jan 28, 2025
1 parent d34d7f1 commit 6de9367
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cube/swiss/source/devices/fat/deviceHandler-FAT.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,15 @@ char* deviceHandler_FAT_status(file_handle* file) {
}
}

static float exiSpeeds[] = {
27.0f/32.0f,
27.0f/16.0f,
27.0f/8.0f,
27.0f/4.0f,
27.0f/2.0f,
27.0f/1.0f
};

char* deviceHandler_FAT_details(file_handle* file) {
char* deviceDetails = NULL;
int isSDCard = IS_SDCARD(file);
Expand Down Expand Up @@ -580,19 +589,21 @@ char* deviceHandler_FAT_details(file_handle* file) {
"Product serial number: %08X\n"
"Manufacturing date: %u-%02u\n"
"\n"
"Bus Speed Mode: %s (%.3g MHz)\n"
"Card Capacity: %.*s\n"
"Speed Class: C%u\n"
"UHS Speed Class: U%u\n"
"Video Speed Class: V%u\n"
"Application Performance Class: A%u\n"
"\n"
"Inconsistencies may indicate a fake SD Card.",
MANUFACTURER_ID(slot),
OEM_APPLICATION_ID(slot),
PRODUCT_NAME(slot),
PRODUCT_REVISION(slot) >> 4, PRODUCT_REVISION(slot) & 0xF,
PRODUCT_SERIAL_NUMBER(slot),
2000 + (MANUFACTURING_DATE(slot) >> 4), MANUFACTURING_DATE(slot) & 0xF,
TRAN_SPEED(slot) == 0x5A ? "High Speed" : "Default Speed",
exiSpeeds[sdgecko_getSpeed(slot)],
formatBytes(c_size_str, c_size, 0, true), c_size_str,
SPEED_CLASS(slot) < 4 ? SPEED_CLASS(slot) * 2 : 10,
UHS_SPEED_GRADE(slot),
Expand Down

0 comments on commit 6de9367

Please sign in to comment.