1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-27 12:02:18 +00:00
hekate/bootloader/libs/fatfs/ffsystem.c

40 lines
1.3 KiB
C
Raw Normal View History

2018-06-23 04:30:57 +01:00
/*------------------------------------------------------------------------*/
/* Sample Code of OS Dependent Functions for FatFs */
/* (C) ChaN, 2017 */
/* (C) CTCaer, 2018 */
/*------------------------------------------------------------------------*/
#include "ff.h"
2018-08-13 09:58:24 +01:00
#include "../../mem/heap.h"
2018-06-23 04:30:57 +01:00
#if FF_USE_LFN == 3 /* Dynamic memory allocation */
/*------------------------------------------------------------------------*/
/* Allocate a memory block */
/*------------------------------------------------------------------------*/
void* ff_memalloc ( /* Returns pointer to the allocated memory block (null on not enough core) */
UINT msize /* Number of bytes to allocate */
)
{
return malloc(msize); /* Allocate a new memory block with POSIX API */
}
/*------------------------------------------------------------------------*/
/* Free a memory block */
/*------------------------------------------------------------------------*/
void ff_memfree (
void* mblock /* Pointer to the memory block to free (nothing to do for null) */
)
{
free(mblock); /* Free the memory block with POSIX API */
}
#endif