Hello
On the FatFs-page there is an example for scanfiles-procedure. it receives a "char* path" But what do i have to overgive to this function?
My files are on a SD-Card. no subdirectories.
Don't have any clue :(
Please help!
Thank you
Hello
On the FatFs-page there is an example for scanfiles-procedure. it receives a "char* path" But what do i have to overgive to this function?
My files are on a SD-Card. no subdirectories.
Don't have any clue :(
Please help!
Thank you
"/" would be the root directory. Probably an empty string will work just as well.
Hello
Are you sure, that it is a frontslash?
Yes I am.
Actually, I think you will use "" as the path to the root directory.
From the accompanying test program, you can specify "", "/", "\" to access the root directory after the initial mount.
char *path = ""; // current directory (starts with root) char *path = "/"; // root directory or : char *path = "\\"; // In C a backslash must be escaped
David.
I can't be 100% sure, but I think the version I used had no concept of "current directory". This was a couple years ago and I used the most stripped down version, too. Things could have changed since then.
how about directory mp3 ?
is it "/MP3" or "MP3" ?
it's pointing to the file but can not read the file inside the sub directory...
if (fno.fattrib & AM_DIR) { /* It is a directory */ sprintf(&path[i], "/s", fn); res = scan_files(path); if (res != FR_OK) break; path[i] = 0; } else { /* It is a file. */ printf("s/s\n", path, fn); usart_pstr(" "); sprintf_P( &temp_buffer, PSTR(" 9lu bytes "), fno.fsize ); usart_pstr( &temp_buffer ); byte_counter = fno.fsize / 512; sprintf_P( &temp_buffer, PSTR(",byte counter => 9lu "), byte_counter ); usart_pstr( &temp_buffer );usart_pstr("\n"); PlayMP3(fn);
}
how about directory mp3 ?
is it "/MP3" or "MP3" ?
Oh, wait a minute...
http://elm-chan.org/fsw/ff/en/fi...
(there's a direct link to that page in the description of f_chdir() - please try and learn to search - what's that famous expression about spoon feeding that some genius once wrote? ;-))