Save root cluster number

This commit is contained in:
Byron Lathi
2023-12-04 21:57:36 -08:00
parent 84814f05f9
commit 902b1b5bb9
4 changed files with 17 additions and 66 deletions

View File

@@ -16,6 +16,9 @@ uint16_t imulii(uint16_t a, uint16_t b) {
uint8_t SD_readSingleBlock(uint32_t addr, uint8_t *buf, uint8_t *error) {
FILE* f = fopen(FILE_PATH, "rb");
(void)error;
fseek(f, addr * 512, SEEK_SET);
fread(buf, 512, 1, f);
fclose(f);
return 0;
}

View File

@@ -3,7 +3,6 @@
void fat32_init(void);
int main(void) {
printf("Hello, world!\n");
fat32_init();
return 0;
}