esp-idf/components/fatfs/port/linux/ffsystem.c
Adam Múdry e6fcaa4f9f fatfs: Update to version 0.15
Updated FATFS to 0.15 from 0.14b and patched for ESP devices
2023-01-30 13:14:54 +00:00

46 lines
962 B
C

/*------------------------------------------------------------------------*/
/* OS Dependent Functions for FatFs */
/* (C)ChaN, 2018 */
/*------------------------------------------------------------------------*/
#include "ff.h"
#include <stdlib.h>
/* This is the implementation for host-side testing on Linux.
* Host-side tests are single threaded, so lock functionality isn't needed.
*/
void* ff_memalloc(UINT msize)
{
return malloc(msize);
}
void ff_memfree(void* mblock)
{
free(mblock);
}
static int* Mutex[FF_VOLUMES + 1]; /* Table of mutex handle */
/* 1:Function succeeded, 0:Could not create the mutex */
int ff_mutex_create(int vol)
{
Mutex[vol] = NULL;
return 1;
}
void ff_mutex_delete(int vol)
{
}
/* 1:Function succeeded, 0:Could not acquire lock */
int ff_mutex_take(int vol)
{
return 1;
}
void ff_mutex_give(int vol)
{
}