mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-10-24 20:51:49 +08:00
feat(fatfs): add FATFS from esp-idf
Commit ID: 3b16089c
This commit is contained in:
46
components/fatfs/port/linux/ffsystem.c
Normal file
46
components/fatfs/port/linux/ffsystem.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/*------------------------------------------------------------------------*/
|
||||
/* 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);
|
||||
}
|
||||
|
||||
/* 1:Function succeeded, 0:Could not create the sync object */
|
||||
int ff_cre_syncobj(BYTE vol, FF_SYNC_t* sobj)
|
||||
{
|
||||
*sobj = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 1:Function succeeded, 0:Could not delete due to an error */
|
||||
int ff_del_syncobj(FF_SYNC_t sobj)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 1:Function succeeded, 0:Could not acquire lock */
|
||||
int ff_req_grant (FF_SYNC_t sobj)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void ff_rel_grant (FF_SYNC_t sobj)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user