Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. // working
  2. char* AUDIO_GetFile(FIL* fil, DIR* dir, FILINFO* fno) {
  3. FRESULT res;
  4. res = f_readdir(dir, fno); /* Read a directory item */
  5. if (fno->fname[0] == '\0')} /* End of files */
  6. ...
  7. }
  8. ...
  9. return &(fno->fname);
  10. }
  11.  
  12. // working
  13. char* AUDIO_GetFile(FIL* fil, DIR* dir, FILINFO* fno) {
  14. FRESULT res;
  15. FILINFO t_fno;
  16. res = f_readdir(dir, &t_fno); /* Read a directory item */
  17. if (t_fno.fname[0] == '\0')} /* End of files */
  18. ...
  19. }
  20. ...
  21. return &(fno->fname);
  22. }
  23.  
  24. // not working
  25. char* AUDIO_GetFile(FIL* fil, DIR* dir, FILINFO* fno) {
  26. FRESULT res;
  27. FILINFO *t_fno = NULL;
  28. res = f_readdir(dir, t_fno); /* Read a directory item */
  29. if (t_fno->fname[0] == '\0')} /* End of files */
  30. ...
  31. }
  32. ...
  33. return &(fno->fname);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement