acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
fsdrv.md (1217B)
1 ```eval_rst 2 .. include:: /header.rst 3 :github_url: |github_link_base|/libs/fsdrv.md 4 ``` 5 6 # File System Interfaces 7 8 LVGL has a [File system](https://docs.lvgl.io/master/overview/file-system.html) module to provide an abstraction layer for various file system drivers. 9 10 LVG has built in support for: 11 - [FATFS](http://elm-chan.org/fsw/ff/00index_e.html) 12 - STDIO (Linux and Windows using C standard function .e.g fopen, fread) 13 - POSIX (Linux and Windows using POSIX function .e.g open, read) 14 - WIN32 (Windows using Win32 API function .e.g CreateFileA, ReadFile) 15 16 You still need to provide the drivers and libraries, this extension provides only the bridge between FATFS, STDIO, POSIX, WIN32 and LVGL. 17 18 ## Usage 19 20 In `lv_conf.h` enable `LV_USE_FS_...` and assign an upper cased letter to `LV_FS_..._LETTER` (e.g. `'S'`). 21 After that you can access files using that driver letter. E.g. `"S:path/to/file.txt"`. 22 23 The work directory can be set with `LV_FS_..._PATH`. E.g. `"/home/joe/projects/"` The actual file/directory paths will be appended to it. 24 25 Cached reading is also supported if `LV_FS_..._CACHE_SIZE` is set to not `0` value. `lv_fs_read` caches this size of data to lower the number of actual reads from the storage.