test_SDCARD.c
19 lines
| 489 B
| text/x-c
|
CLexer
r68 | ||||
#include <stdio.h> | ||||
#include <fat32.h> | ||||
#include <ucdirent.h> | ||||
void printRootClustersChain(FAT32fs* sdcard2FAT32part) | ||||
{ | ||||
ucdirent root; | ||||
uint32_t sector_lba,res,tmp=sdcard2FAT32part->cluster_begin_lba; | ||||
sector_lba=tmp; | ||||
do | ||||
{ | ||||
printf("Sector @0x%x\n",tmp); | ||||
//sector_lba=tmp+sdcard2FAT32part->BPB_SecPerClus-1; | ||||
sector_lba=tmp; | ||||
res=fat32nextsectorlba(sdcard2FAT32part,sector_lba,&tmp); | ||||
}while((res==DIRENT_noErr)&&(res!=DIRENT_LastSect)); | ||||
} | ||||