45 #if _MULTI_PARTITION != 0 46 const PARTITION Drives[] =
60 static const char *err_msg[] =
83 "TOO_MANY_OPEN_FILES",
150 ptr =
"INVALID ERROR MESSAGE";
152 ptr = (
char *) err_msg[(
int)rc];
153 printf(
"rc=%u FR_%s\n", rc, ptr);
212 if (fr !=
FR_OK)
break;
276 while(*ptr ==
' ' || *ptr ==
'\t')
278 printf(
"fatfs status:%s\n",ptr);
302 printf(
"Volume name = %s\n", label[0] ? label :
"<blank>");
313 printf(
"%u files, %lu bytes.\n%u folders.\n" 314 "%lu KB total disk space.\n%lu KB available.\n",
338 if(info->
fname[0] == 0)
340 printf(
"fatfs_filinfo_list: empty\n");
349 printf(
"%s %u/%02u/%02u %02u:%02u %9lu %s",
MEMSPACE DWORD get_fattime(void)
Read time and convert to FAT32 time.
MEMSPACE size_t WEAK_ATR strlen(const char *str)
String Length.
Master include file for project Includes all project includes and defines here.
Common Linux/POSIX time functions.
MEMSPACE FRESULT f_readdir(DIR *dp, FILINFO *fno)
static struct ip_info info
MEMSPACE FRESULT f_getfree(const TCHAR *path, DWORD *nclst, FATFS **fatfs)
MEMSPACE char * fatfs_fstype(int type)
return a string with the file system type
MEMSPACE time_t time(time_t *t)
Return second from epoch - POSIX function.
MEMSPACE FRESULT f_opendir(DIR *dp, const TCHAR *path)
void optimistic_yield(uint32_t interval_us)
MEMSPACE void fatfs_status(char *ptr)
Compute space used, number of directories and files contained used by a drive.
MEMSPACE WEAK_ATR char * strcpy(char *dest, const char *src)
copy a string
uint32_t time_t
type of EPOCH result.
MEMSPACE void put_rc(int rc)
display FatFs return code as ascii string
MEMSPACE tm_t * localtime(time_t *tp)
Convert POSIX epoch time_t *tp into POSIX tm_t *result.
Math IO functions, and verious conversion code with floating point support.
MEMSPACE void fatfs_filinfo_list(FILINFO *info)
Display FILINFO structure in a readable format.
WORD AccFiles
Total number or Files and Directories.
MEMSPACE void wdt_reset(void)
reset watchdog
MEMSPACE int printf(const char *format,...)
DWORD AccSize
Total file space used.
MEMSPACE int fatfs_scan_files(char *path)
Use were FILINFO structure can be share in many functions See: fatfs_alloc_filinfo(), fatfs_scan_files() and fatfs_ls()
MEMSPACE uint32_t tm_to_fat(tm_t *t)
FAT time structer reference.
FATFS Fatfs[_VOLUMES]
FatFs Drive Volumes.
MEMSPACE FRESULT f_getlabel(const TCHAR *path, TCHAR *label, DWORD *vsn)