mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
chore: fix build errors
This commit is contained in:
parent
f3cb2c5772
commit
e657c74aca
BIN
examples/libs/jpg/img_lvgl_logo.jpg
Normal file
BIN
examples/libs/jpg/img_lvgl_logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
@ -1,10 +1,10 @@
|
||||
/**
|
||||
* @file lv_example_sjpg.h
|
||||
* @file lv_example_jpg.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LV_EXAMPLE_SJPG_H
|
||||
#define LV_EXAMPLE_SJPG_H
|
||||
#ifndef LV_EXAMPLE_JPG_H
|
||||
#define LV_EXAMPLE_JPG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -25,7 +25,7 @@ extern "C" {
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
void lv_example_sjpg_1(void);
|
||||
void lv_example_jpg_1(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
@ -35,4 +35,4 @@ void lv_example_sjpg_1(void);
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*LV_EXAMPLE_SJPG_H*/
|
||||
#endif /*LV_EXAMPLE_JPG_H*/
|
@ -1,20 +1,17 @@
|
||||
#include "../../lv_examples.h"
|
||||
#if LV_USE_SJPG && LV_BUILD_EXAMPLES
|
||||
#if LV_USE_JPG && LV_BUILD_EXAMPLES
|
||||
|
||||
/**
|
||||
* Load an SJPG image
|
||||
* Load a JPG image
|
||||
*/
|
||||
void lv_example_sjpg_1(void)
|
||||
void lv_example_jpg_1(void)
|
||||
{
|
||||
lv_obj_t * wp;
|
||||
|
||||
LV_IMAGE_DECLARE(codeblocks)
|
||||
|
||||
wp = lv_image_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_image_set_src(wp, "A:codeblocks.jpg");
|
||||
// lv_image_set_src(wp, &codeblocks);
|
||||
lv_image_set_src(wp, "A:lvgl/examples/libs/jpg/img_lvgl_logo.jpg");
|
||||
lv_obj_center(wp);
|
||||
}
|
||||
|
@ -9,5 +9,5 @@ fs_driver.fs_register(fs_drv, 'S')
|
||||
wp = lv.image(lv.scr_act())
|
||||
# The File system is attached to letter 'S'
|
||||
|
||||
wp.set_src("S:small_image.sjpg")
|
||||
wp.set_src("S:img_lvgl_logo.jpg")
|
||||
wp.center()
|
@ -21,7 +21,7 @@ extern "C" {
|
||||
#include "png/lv_example_png.h"
|
||||
#include "qrcode/lv_example_qrcode.h"
|
||||
#include "rlottie/lv_example_rlottie.h"
|
||||
#include "sjpg/lv_example_sjpg.h"
|
||||
#include "jpg/lv_example_jpg.h"
|
||||
#include "tiny_ttf/lv_example_tiny_ttf.h"
|
||||
|
||||
/*********************
|
||||
|
Binary file not shown.
@ -583,7 +583,7 @@
|
||||
|
||||
/* JPG + split JPG decoder library.
|
||||
* Split JPG is a custom format optimized for embedded systems. */
|
||||
#define LV_USE_SJPG 0
|
||||
#define LV_USE_JPG 0
|
||||
|
||||
/*GIF decoder library*/
|
||||
#define LV_USE_GIF 0
|
||||
|
@ -46,7 +46,7 @@
|
||||
*********************/
|
||||
|
||||
#include "../../../lvgl.h"
|
||||
#if LV_USE_SJPG
|
||||
#if LV_USE_JPG
|
||||
|
||||
#include "tjpgd.h"
|
||||
#include "lv_jpg.h"
|
||||
@ -85,7 +85,7 @@ static int is_jpg(const uint8_t * raw_data, size_t len);
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
void lv_jpeg_init(void)
|
||||
void lv_jpg_init(void)
|
||||
{
|
||||
lv_image_decoder_t * dec = lv_image_decoder_create();
|
||||
lv_image_decoder_set_info_cb(dec, decoder_info);
|
||||
@ -288,4 +288,4 @@ static int is_jpg(const uint8_t * raw_data, size_t len)
|
||||
return memcmp(jpg_signature, raw_data, sizeof(jpg_signature)) == 0;
|
||||
}
|
||||
|
||||
#endif /*LV_USE_SJPG*/
|
||||
#endif /*LV_USE_JPG*/
|
||||
|
@ -14,7 +14,7 @@ extern "C" {
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#if LV_USE_SJPG
|
||||
#if LV_USE_JPG
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
@ -28,13 +28,13 @@ extern "C" {
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
void lv_jpeg_init(void);
|
||||
void lv_jpg_init(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*LV_USE_SJPG*/
|
||||
#endif /*LV_USE_JPG*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1957,11 +1957,11 @@
|
||||
|
||||
/* JPG + split JPG decoder library.
|
||||
* Split JPG is a custom format optimized for embedded systems. */
|
||||
#ifndef LV_USE_SJPG
|
||||
#ifdef CONFIG_LV_USE_SJPG
|
||||
#define LV_USE_SJPG CONFIG_LV_USE_SJPG
|
||||
#ifndef LV_USE_JPG
|
||||
#ifdef CONFIG_LV_USE_JPG
|
||||
#define LV_USE_JPG CONFIG_LV_USE_JPG
|
||||
#else
|
||||
#define LV_USE_SJPG 0
|
||||
#define LV_USE_JPG 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -219,8 +219,8 @@ void lv_init(void)
|
||||
lv_png_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_SJPG
|
||||
lv_jpeg_init();
|
||||
#if LV_USE_JPG
|
||||
lv_jpg_init();
|
||||
#endif
|
||||
|
||||
#if LV_USE_BMP
|
||||
|
@ -63,7 +63,7 @@
|
||||
|
||||
#define LV_USE_PNG 1
|
||||
#define LV_USE_BMP 1
|
||||
#define LV_USE_SJPG 1
|
||||
#define LV_USE_JPG 1
|
||||
#define LV_USE_GIF 1
|
||||
#define LV_USE_QRCODE 1
|
||||
#define LV_USE_BARCODE 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user