mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Fix LVGL filesystem interface
This commit is contained in:
parent
dca38d199c
commit
cf6817304b
@ -6,6 +6,7 @@
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
|
#include "lvgl.h"
|
||||||
#include "lv_fs_if.h"
|
#include "lv_fs_if.h"
|
||||||
|
|
||||||
#if LV_USE_FS_IF
|
#if LV_USE_FS_IF
|
||||||
|
@ -13,6 +13,7 @@ extern "C" {
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
|
#include "lvgl.h"
|
||||||
|
|
||||||
#if LV_USE_FS_IF
|
#if LV_USE_FS_IF
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
/*********************
|
/*********************
|
||||||
* INCLUDES
|
* INCLUDES
|
||||||
*********************/
|
*********************/
|
||||||
|
#include "lvgl.h"
|
||||||
#include "lv_fs_if.h"
|
#include "lv_fs_if.h"
|
||||||
#if LV_USE_FS_IF
|
#if LV_USE_FS_IF
|
||||||
#if LV_FS_IF_PC != '\0'
|
#if LV_FS_IF_PC != '\0'
|
||||||
@ -150,6 +151,9 @@ static lv_fs_res_t fs_open(lv_fs_drv_t* drv, void* file_p, const char* path, lv_
|
|||||||
sprintf(buf, LV_FS_PC_PATH "\\%s", path);
|
sprintf(buf, LV_FS_PC_PATH "\\%s", path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
LV_LOG_USER(LV_FS_PC_PATH "/%%s");
|
||||||
|
LV_LOG_USER(buf);
|
||||||
|
|
||||||
file_t f = fopen(buf, flags);
|
file_t f = fopen(buf, flags);
|
||||||
if(f == NULL) return LV_FS_RES_UNKNOWN;
|
if(f == NULL) return LV_FS_RES_UNKNOWN;
|
||||||
|
|
||||||
@ -298,7 +302,7 @@ static lv_fs_res_t fs_trunc(lv_fs_drv_t* drv, void* file_p)
|
|||||||
|
|
||||||
fflush(*fp); /*If not syncronized fclose can write the truncated part*/
|
fflush(*fp); /*If not syncronized fclose can write the truncated part*/
|
||||||
uint32_t p = ftell(*fp);
|
uint32_t p = ftell(*fp);
|
||||||
// ftruncate(fileno(*fp), p);
|
// ftruncate(fileno(*fp), p);
|
||||||
return LV_FS_RES_OK;
|
return LV_FS_RES_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user