Solved
How to better show file structure with FatFS and TouchGFX?
Hello!
I have code, working with FatFS in system area of my project.
main.c
res = f_opendir(&dir, "0:/");
while(1)
{
res = f_readdir(&dir, &fileInfo);
if (res==FR_OK && fileInfo.fname[0])
{
fn = fileInfo.fname;
// ... some code
}
else break;
}
f_closedir(&dir);And I have scrollList widget, where I want to show filelist.
How can I send list of filenames to widget by Model->Presenter->View ?
- Create array filelist[65535][256] , and send it to view - is not good idea...
- Step by step sending command from View to System which everytime calls " res = f_readdir(&dir, &fileInfo); ", gets filename, and asks next filename again - is better, but still not good.
- Can I call res = f_opendir(&dir, "0:/"), and send variable "dir" to view?
- May be I can #include "fatfs.h" in STORAGE_SCREENView.cpp and work with FatFS from View?
What can you advise for me?
