mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
rename lv_fs_free to lv_fs_free_space to avoid collosion woth free()
This commit is contained in:
parent
f7d6604b9b
commit
cc3ef640da
@ -434,7 +434,7 @@ lv_fs_res_t lv_fs_dir_close(lv_fs_dir_t * rddir_p)
|
||||
* @param free_p pointer to store the free size [kB]
|
||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||
*/
|
||||
lv_fs_res_t lv_fs_free(char letter, uint32_t * total_p, uint32_t * free_p)
|
||||
lv_fs_res_t lv_fs_free_space(char letter, uint32_t * total_p, uint32_t * free_p)
|
||||
{
|
||||
lv_fs_drv_t * drv = lv_fs_get_drv(letter);
|
||||
|
||||
@ -444,12 +444,12 @@ lv_fs_res_t lv_fs_free(char letter, uint32_t * total_p, uint32_t * free_p)
|
||||
|
||||
lv_fs_res_t res;
|
||||
|
||||
if(drv->free == NULL) {
|
||||
if(drv->free_space == NULL) {
|
||||
res = LV_FS_RES_NOT_IMP;
|
||||
} else {
|
||||
uint32_t total_tmp = 0;
|
||||
uint32_t free_tmp = 0;
|
||||
res = drv->free(&total_tmp, &free_tmp);
|
||||
res = drv->free_space(&total_tmp, &free_tmp);
|
||||
|
||||
if(total_p != NULL) *total_p = total_tmp;
|
||||
if(free_p != NULL) *free_p = free_tmp;
|
||||
|
@ -90,7 +90,7 @@ typedef struct __lv_fs_drv_t
|
||||
lv_fs_res_t (*trunc) (void * file_p);
|
||||
lv_fs_res_t (*size) (void * file_p, uint32_t * size_p);
|
||||
lv_fs_res_t (*rename) (const char * oldname, const char * newname);
|
||||
lv_fs_res_t (*free) (uint32_t * total_p, uint32_t * free_p);
|
||||
lv_fs_res_t (*free_space) (uint32_t * total_p, uint32_t * free_p);
|
||||
|
||||
lv_fs_res_t (*dir_open) (void * rddir_p, const char * path);
|
||||
lv_fs_res_t (*dir_read) (void * rddir_p, char * fn);
|
||||
@ -234,7 +234,7 @@ lv_fs_res_t lv_fs_dir_close (lv_fs_dir_t * rddir_p);
|
||||
* @param free_p pointer to store the free size [kB]
|
||||
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
|
||||
*/
|
||||
lv_fs_res_t lv_fs_free (char letter, uint32_t * total_p, uint32_t * free_p);
|
||||
lv_fs_res_t lv_fs_free_space (char letter, uint32_t * total_p, uint32_t * free_p);
|
||||
|
||||
/**
|
||||
* Fill a buffer with the letters of existing drivers
|
||||
|
@ -72,7 +72,7 @@ void lv_ufs_init(void)
|
||||
ufs_drv.tell = lv_ufs_tell;
|
||||
ufs_drv.size = lv_ufs_size;
|
||||
ufs_drv.trunc = lv_ufs_trunc;
|
||||
ufs_drv.free = lv_ufs_free;
|
||||
ufs_drv.free_space = lv_ufs_free;
|
||||
|
||||
ufs_drv.dir_open = lv_ufs_dir_open;
|
||||
ufs_drv.dir_read = lv_ufs_dir_read;
|
||||
|
Loading…
x
Reference in New Issue
Block a user