Created
May 11, 2018 23:51
-
-
Save boochow/030bf5259414fb0e305491a3d2570242 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (sd_init() == SD_OK) { | |
unsigned char buf[1024]; | |
if (sd_readblock(0, buf, 1)) { | |
for (int i = 0; i < 512; i++) { | |
if (i % 16 == 0) { | |
printf("%04x:", i); | |
} | |
printf("%02x ", buf[i]); | |
if ((i + 1) % 16 == 0) { | |
printf("\n\r"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment