ESP3D  3.0
Firmware for ESP boards connected to 3D Printer
lv_flash_drv.h
Go to the documentation of this file.
1 /*
2  lv_flash_drv.h - ESP3D flash (spiffs/Fat/etc) driver for lvgl
3 
4  Copyright (c) 2014 Luc Lebosse. All rights reserved.
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 #ifndef _LV_FLASH_DRV_H
21 #define _LV_FLASH_DRV_H
22 #include "FS.h"
23 #include <lvgl.h>
24 
25 /**********************
26  * TYPEDEFS
27  **********************/
28 typedef struct {
29  File * fileobjecthandle;
30 } file_t;
31 
32 /**********************
33  * PROTOTYPES
34  **********************/
35 /*Interface functions to file functions (only the required ones to image handling)*/
36 extern lv_fs_res_t esp_flash_open(lv_fs_drv_t * drv, void * file_p, const char * fn, lv_fs_mode_t mode);
37 extern lv_fs_res_t esp_flash_close(lv_fs_drv_t * drv, void * file_p);
38 extern lv_fs_res_t esp_flash_read(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
39 extern lv_fs_res_t esp_flash_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos);
40 extern lv_fs_res_t esp_flash_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
41 
42 
43 #endif //_LV_FLASH_DRV_H
file_t
Definition: lv_flash_drv.h:28
esp_flash_tell
lv_fs_res_t esp_flash_tell(lv_fs_drv_t *drv, void *file_p, uint32_t *pos_p)
esp_flash_seek
lv_fs_res_t esp_flash_seek(lv_fs_drv_t *drv, void *file_p, uint32_t pos)
esp_flash_read
lv_fs_res_t esp_flash_read(lv_fs_drv_t *drv, void *file_p, void *buf, uint32_t btr, uint32_t *br)
esp_flash_open
lv_fs_res_t esp_flash_open(lv_fs_drv_t *drv, void *file_p, const char *fn, lv_fs_mode_t mode)
esp_flash_close
lv_fs_res_t esp_flash_close(lv_fs_drv_t *drv, void *file_p)