We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85c98b6 commit 88f0998Copy full SHA for 88f0998
examples/MassStorage/msc_external_flash_sdcard/msc_external_flash_sdcard.ino
@@ -138,7 +138,9 @@ bool init_sdcard(void)
138
139
if ( !sd.begin(SDCARD_CS, SD_SCK_MHZ(50)) )
140
{
141
- Serial.print("Failed");
+ Serial.print("Failed ");
142
+ sd.errorPrint();
143
+
144
return false;
145
}
146
@@ -149,7 +151,7 @@ bool init_sdcard(void)
149
151
sd_changed = true; // to print contents initially
150
152
153
Serial.print("OK, Card size = ");
- Serial.print(block_count * 512 / (1024*1024));
154
+ Serial.print((block_count / (1024*1024)) * 512);
155
Serial.println(" MB");
156
157
return true;
0 commit comments