Comments (9)
If so, why not use the original file system API directly instead of using the lvgl proxy API?
LVGL can be used in many environments and platform (PC, embedded, many RTOS, many FS libs) and internally LVGL needs to have an abstract way to to open and read images and other assets.
There is no file/directory creation API because the FS API was intended to be used internally by LVGL where just read the assets.
Did you use LVGL's FS in the application code or was it required for the UI itself?
from lvgl.
maybe i want input some text or get some data, i need show it in lvgl, then confirmation, create the file and save it.
Could you tell me a little bit about where lv_fs is mainly used?
I would prefer to use the same file system interface throughout the program, rather than mixing multiple interfaces, which is prone to errors.
from lvgl.
With mode LV_FS_MODE_WR
, it will write to file, or create if not exist.
See
lvgl/src/libs/fsdrv/lv_fs_posix.c
Line 111 in 730a3bd
from lvgl.
With mode
LV_FS_MODE_WR
, it will write to file, or create if not exist.See
lvgl/src/libs/fsdrv/lv_fs_posix.c
Line 111 in 730a3bd
I know this problem can be solved by modifying the source code of lvgl, but I just raised my doubt. It would be better if the lvgl project could solve this problem in github.
from lvgl.
It's already in LVGL. You can use open a file with the LV_FS_MODE_WR | LV_FS_MODE_RD
flags.
from lvgl.
It is a bit field variable, so I think the following solution should be better?
int flags = 0;
if(mode & LV_FS_MODE_RD) flags |= O_RDONLY;
if(mode & LV_FS_MODE_WR) flags |= O_WRONLY | O_CREAT;
from lvgl.
They are defines like this for me:
#define O_RDONLY 00
#define O_WRONLY 01
#define O_RDWR 02
So O_RDONLY | O_WRONLY != O_RDWR
from lvgl.
They are defines like this for me:
#define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02
So
O_RDONLY | O_WRONLY != O_RDWR
Well, OK.
But if there are not too many flags, I think we should use bitmaps instead of the original define, which is more efficient.
Such changes are not destructive.
As variables used as flags, there should be no user passing in original values.
from lvgl.
We need some feedback on this issue.
Now we mark this as "stale" because there was no activity here for 14 days.
Remove the "stale" label or comment else this will be closed in 7 days.
from lvgl.
Related Issues (20)
- High level language wrapper for LGVL HOT 4
- Roller Not Sending Value Changed Event When Setting The Index From Code HOT 3
- Add `LV_OBJ_CLASS_GROUP_DEF_TRUE` to the Arc object so it can be used with rotary encoder indevs HOT 1
- Lottie animation freezes when size changed HOT 2
- Use Arm2D with LLVM HOT 8
- coding style check on github is different from the one on the master branch HOT 1
- After merging #6068, the font converter produced erroneous files. HOT 2
- Can we add image pre caching function in lvgl HOT 3
- How to use private headers HOT 9
- Let the user change long_press_time easily HOT 4
- GESTURE bug HOT 4
- Add a define to lv_conf.h to skip SD Card initialization HOT 1
- Is there any official obj can be easy to Reflects the state of the hardware?
- NEON sw/blend assembler generates superfluous symbols HOT 2
- How to use LV_EVENT_DRAW_TASK_ADDED to refactor the text for scale? HOT 2
- LVGL and STM32 Integration Issue HOT 1
- Version V9.1, RLE decompression error occurred. HOT 5
- Kconfig file format error?
- Roller Crashes If Only Given One String HOT 5
- LV_MEM_SIZE Optimum Value HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lvgl.