I Use ELM Chan fatfs library for file system. This application reads a USB memory MSC. I want to read all the MP3 files in root directory in a sorted manner but I can not use an array to save all the file paths, Number of files exceeds ram memory of my microcontroller. I have the bellow idea.
- function that save the index of the MP3 files in an (array of indexes)
- A function that gets file name based on the f_readdir index that was saved in (array of indexes)
- Sort (array of indexes) based on the bubble sort.
- read file based on this sorted indexes array
Is This a viable solution? I think this method is really slow