Description
What MCU/Processor/Board and compiler are you using?
STM32F407
What LVGL version are you using?
8.0.2
What do you want to achieve?
What have you tried so far?
In my project lvgl v7,the fs_open() as below:
##########################################
static lv_fs_res_t fs_open (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
…
if(mode == LV_FS_MODE_RD)
FRESULT fres = f_open((FIL *)file_p, path, FA_OPEN_EXISTING | FA_READ);
…
}
##########################################
But the param “void * file_p” is deleted in fs_open() and retains in fs_read()/fs_write() in lvgl v8.0.2, as below:
##########################################
void * fs_open(lv_fs_drv_t * drv, const char * path, lv_fs_mode_t mode);
lv_fs_res_t fs_read (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
##########################################
So, how to program f_open() in fs_open() to open the file.
Code to reproduce
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
## Screenshot and/or video
If possible, add screenshots and/or videos about the current state.