1. PNG图片显示
使用教程参考官方文档
1、先打开文件系统的支持
*API for open, read, etc*/
#define LV_USE_FS_POSIX 1
#if LV_USE_FS_POSIX
#define LV_FS_POSIX_LETTER 'A' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#define LV_FS_POSIX_PATH "A:/home/xj/asm/data/" /*Set the working directory. File/directory paths will be appended to it.*/
#define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#endif
2、再打开相对应的图片格式支持
*PNG decoder library*/ #define LV_USE_PNG 1 /*BMP decoder library*/ #define LV_USE_BMP 0 /* JPG + split JPG decoder library. * Split JPG is a custom format optimized for embedded systems. */ #define LV_USE_SJPG 0 /*GIF decoder library*/ #define LV_USE_GIF 0
这里有个注意的点:
<