1
0
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:
Gabor Kiss-Vamosi 2023-09-18 21:29:22 +02:00
parent f3cb2c5772
commit e657c74aca
13 changed files with 25 additions and 28 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,10 +1,10 @@
/** /**
* @file lv_example_sjpg.h * @file lv_example_jpg.h
* *
*/ */
#ifndef LV_EXAMPLE_SJPG_H #ifndef LV_EXAMPLE_JPG_H
#define LV_EXAMPLE_SJPG_H #define LV_EXAMPLE_JPG_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -25,7 +25,7 @@ extern "C" {
/********************** /**********************
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
void lv_example_sjpg_1(void); void lv_example_jpg_1(void);
/********************** /**********************
* MACROS * MACROS
@ -35,4 +35,4 @@ void lv_example_sjpg_1(void);
} /*extern "C"*/ } /*extern "C"*/
#endif #endif
#endif /*LV_EXAMPLE_SJPG_H*/ #endif /*LV_EXAMPLE_JPG_H*/

View File

@ -1,20 +1,17 @@
#include "../../lv_examples.h" #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_obj_t * wp;
LV_IMAGE_DECLARE(codeblocks)
wp = lv_image_create(lv_scr_act()); wp = lv_image_create(lv_scr_act());
/* Assuming a File system is attached to letter 'A' /* Assuming a File system is attached to letter 'A'
* E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ * 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, "A:lvgl/examples/libs/jpg/img_lvgl_logo.jpg");
// lv_image_set_src(wp, &codeblocks);
lv_obj_center(wp); lv_obj_center(wp);
} }

View File

@ -9,5 +9,5 @@ fs_driver.fs_register(fs_drv, 'S')
wp = lv.image(lv.scr_act()) wp = lv.image(lv.scr_act())
# The File system is attached to letter 'S' # 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() wp.center()

View File

@ -21,7 +21,7 @@ extern "C" {
#include "png/lv_example_png.h" #include "png/lv_example_png.h"
#include "qrcode/lv_example_qrcode.h" #include "qrcode/lv_example_qrcode.h"
#include "rlottie/lv_example_rlottie.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" #include "tiny_ttf/lv_example_tiny_ttf.h"
/********************* /*********************

Binary file not shown.

View File

@ -583,7 +583,7 @@
/* JPG + split JPG decoder library. /* JPG + split JPG decoder library.
* Split JPG is a custom format optimized for embedded systems. */ * Split JPG is a custom format optimized for embedded systems. */
#define LV_USE_SJPG 0 #define LV_USE_JPG 0
/*GIF decoder library*/ /*GIF decoder library*/
#define LV_USE_GIF 0 #define LV_USE_GIF 0

View File

@ -46,7 +46,7 @@
*********************/ *********************/
#include "../../../lvgl.h" #include "../../../lvgl.h"
#if LV_USE_SJPG #if LV_USE_JPG
#include "tjpgd.h" #include "tjpgd.h"
#include "lv_jpg.h" #include "lv_jpg.h"
@ -85,7 +85,7 @@ static int is_jpg(const uint8_t * raw_data, size_t len);
* GLOBAL FUNCTIONS * GLOBAL FUNCTIONS
**********************/ **********************/
void lv_jpeg_init(void) void lv_jpg_init(void)
{ {
lv_image_decoder_t * dec = lv_image_decoder_create(); lv_image_decoder_t * dec = lv_image_decoder_create();
lv_image_decoder_set_info_cb(dec, decoder_info); 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; return memcmp(jpg_signature, raw_data, sizeof(jpg_signature)) == 0;
} }
#endif /*LV_USE_SJPG*/ #endif /*LV_USE_JPG*/

View File

@ -14,7 +14,7 @@ extern "C" {
* INCLUDES * INCLUDES
*********************/ *********************/
#if LV_USE_SJPG #if LV_USE_JPG
/********************* /*********************
* DEFINES * DEFINES
@ -28,13 +28,13 @@ extern "C" {
* GLOBAL PROTOTYPES * GLOBAL PROTOTYPES
**********************/ **********************/
void lv_jpeg_init(void); void lv_jpg_init(void);
/********************** /**********************
* MACROS * MACROS
**********************/ **********************/
#endif /*LV_USE_SJPG*/ #endif /*LV_USE_JPG*/
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -1957,11 +1957,11 @@
/* JPG + split JPG decoder library. /* JPG + split JPG decoder library.
* Split JPG is a custom format optimized for embedded systems. */ * Split JPG is a custom format optimized for embedded systems. */
#ifndef LV_USE_SJPG #ifndef LV_USE_JPG
#ifdef CONFIG_LV_USE_SJPG #ifdef CONFIG_LV_USE_JPG
#define LV_USE_SJPG CONFIG_LV_USE_SJPG #define LV_USE_JPG CONFIG_LV_USE_JPG
#else #else
#define LV_USE_SJPG 0 #define LV_USE_JPG 0
#endif #endif
#endif #endif

View File

@ -219,8 +219,8 @@ void lv_init(void)
lv_png_init(); lv_png_init();
#endif #endif
#if LV_USE_SJPG #if LV_USE_JPG
lv_jpeg_init(); lv_jpg_init();
#endif #endif
#if LV_USE_BMP #if LV_USE_BMP

View File

@ -63,7 +63,7 @@
#define LV_USE_PNG 1 #define LV_USE_PNG 1
#define LV_USE_BMP 1 #define LV_USE_BMP 1
#define LV_USE_SJPG 1 #define LV_USE_JPG 1
#define LV_USE_GIF 1 #define LV_USE_GIF 1
#define LV_USE_QRCODE 1 #define LV_USE_QRCODE 1
#define LV_USE_BARCODE 1 #define LV_USE_BARCODE 1