/* List up to 25 file on the root directory with extension .BMP.  */
uint32_t Storage_GetDirectoryBitmapFiles(const char *DirName, char *Files[])
/* List up to 25 file on the root directory with extension .BMP.  */
uint32_t Storage_GetDirectoryBitmapFiles(const char *DirName, char *Files[])
{
  FRESULT res;
  uint32_t index = 0;
  if(f_mount(&fs, (TCHAR const*)"",0) != FR_OK)
  {
    return 0;
  }
  res = f_findfirst(&MyDirectory, &MyFileInfo, DirName, "*.bmp");
  while (MyFileInfo.fname[0])
  {
    if(res == FR_OK)
    {
      if(index < MAX_BMP_FILES)
      {
        sprintf (Files[index++], "%s", MyFileInfo.fname);
      }
      res = f_findnext(&MyDirectory, &MyFileInfo);
    }
    else
    {
      index = 0;
      break;
    }
  }
  f_closedir(&MyDirectory);
  return index; 
}