resubmit the lvgl code

This commit is contained in:
Wang_Weigen
2022-01-18 16:38:38 +08:00
parent a5066f8a36
commit 65a3861ea7
879 changed files with 304372 additions and 1 deletions
@@ -0,0 +1,6 @@
Load an SJPG image
"""""""""""""""""""""""""""""""""""""""""""""""
.. lv_example:: libs/sjpg/lv_example_sjpg_1
:language: c
@@ -0,0 +1,38 @@
/**
* @file lv_example_sjpg.h
*
*/
#ifndef LV_EXAMPLE_SJPG_H
#define LV_EXAMPLE_SJPG_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_example_sjpg_1(void);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_EXAMPLE_SJPG_H*/
@@ -0,0 +1,17 @@
#include "../../lv_examples.h"
#if LV_USE_SJPG && LV_BUILD_EXAMPLES
/**
* Load an SJPG image
*/
void lv_example_sjpg_1(void)
{
lv_obj_t * wp;
wp = lv_img_create(lv_scr_act());
/* Assuming a File system is attached to letter 'A'
* E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */
lv_img_set_src(wp, "A:lvgl/examples/libs/sjpg/small_image.sjpg");
}
#endif