ffsystem.c 1012 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*------------------------------------------------------------------------*/
  2. /* OS Dependent Functions for FatFs */
  3. /* (C)ChaN, 2018 */
  4. /*------------------------------------------------------------------------*/
  5. #include "ff.h"
  6. #include <stdlib.h>
  7. /* This is the implementation for host-side testing on Linux.
  8. * Host-side tests are single threaded, so lock functionality isn't needed.
  9. */
  10. void* ff_memalloc(UINT msize)
  11. {
  12. return malloc(msize);
  13. }
  14. void ff_memfree(void* mblock)
  15. {
  16. free(mblock);
  17. }
  18. /* 1:Function succeeded, 0:Could not create the sync object */
  19. int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj)
  20. {
  21. *sobj = NULL;
  22. return 1;
  23. }
  24. /* 1:Function succeeded, 0:Could not delete due to an error */
  25. int ff_del_syncobj(FF_SYNC_t sobj)
  26. {
  27. return 1;
  28. }
  29. /* 1:Function succeeded, 0:Could not acquire lock */
  30. int ff_req_grant (FF_SYNC_t sobj)
  31. {
  32. return 1;
  33. }
  34. void ff_rel_grant (FF_SYNC_t sobj)
  35. {
  36. }