Skip to main content

lv_fs_make_path_from_buffer

Function lv_fs_make_path_from_buffer 

Source
pub unsafe extern "C" fn lv_fs_make_path_from_buffer(
    path: *mut lv_fs_path_ex_t,
    letter: c_char,
    buf: *const c_void,
    size: u32,
    ext: *const c_char,
)
Expand description

Create a special object from buffer/ memory address which looks like a file and can be passed as path to lv_fs_open and other functions accepting a path.

For example @code //Create a PNG file from t a buffer and use it lv_fs_path_ex_t p; lv_fs_make_path_from_buffer(&p, ‘A’, my_buf, my_buf_size, “png”); lv_image_set_src(image1, &p);

@endcode @param path path to a lv_fs_path_ex object @param letter the identifier letter of the driver. E.g. LV_FS_MEMFS_LETTER @param buf address of the memory buffer @param size size of the memory buffer in bytes @param ext the extension, e.g. “png”, if NULL no extension will be added.