initial commit

This commit is contained in:
2026-02-12 00:45:31 -08:00
commit 5f168f370b
3024 changed files with 804889 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
Load an SJPG image
"""""""""""""""""""""""""""""""""""""""""""""""
.. lv_example:: libs/sjpg/lv_example_sjpg_1
:language: c

View File

@@ -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*/

View File

@@ -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

View File

@@ -0,0 +1,13 @@
#!/opt/bin/lv_micropython -i
import lvgl as lv
import display_driver
import fs_driver
fs_drv = lv.fs_drv_t()
fs_driver.fs_register(fs_drv, 'S')
wp = lv.img(lv.scr_act())
# The File system is attached to letter 'S'
wp.set_src("S:small_image.sjpg")
wp.center()

Binary file not shown.