Part Number: TM4C1294NCPDT
Hi all,
I want to read long file name for USB flash drive using TM4C1294.
The sample codes show as below.
DIR dirs;
FILINFO finfo;
char path[255] ;
TCHAR lfname[_MAX_LFN];
if (f_opendir(&dirs, path) == FR_OK)
{
finfo.lfname = lfname;
finfo.lfsize = _MAX_LFN - 1;
if(f_readdir(&dirs, &finfo) == FR_OK)
{
if(!finfo.fname[0])
{
UartPrintf("No Data\n");
return;
}
UartPrintf("File fn: %s\n",finfo.fname);
UartPrintf("File lfn: %s\n",finfo.lfname);
}
else
{
UartPrintf("EOF\n");
}
}
I can read the correct fname but the lfname is always show "???????" .
In the ffconf.h setting I modified some define value.
#define _USE_LFN 2
Should I set any other define value to let the lfname working?
Thanks for your help
Best Regards
Arthur