1 /**
2  * @file lv_demo_high_res.c
3  *
4  */
5 
6 /*********************
7  *      INCLUDES
8  *********************/
9 
10 #include "lv_demo_high_res_private.h"
11 #if LV_USE_DEMO_HIGH_RES
12 
13 #if LV_FS_DEFAULT_DRIVER_LETTER == '\0'
14     #error set a default drive letter (and enable an FS driver) for the high res demo
15 #endif
16 
17 #if !LV_FONT_FMT_TXT_LARGE
18     #error LV_FONT_FMT_TXT_LARGE needs to be enabled in lv_conf.h for the high res demo
19 #endif
20 
21 /*********************
22  *      DEFINES
23  *********************/
24 
25 /**********************
26  *      TYPEDEFS
27  **********************/
28 
29 /**********************
30  *  STATIC VARIABLES
31  **********************/
32 
33 /**********************
34  *      MACROS
35  **********************/
36 
37 /**********************
38  *   GLOBAL FUNCTIONS
39  **********************/
40 
lv_demo_high_res(const char * assets_path,const char * logo_path,const char * slides_path,lv_demo_high_res_exit_cb_t exit_cb)41 lv_demo_high_res_api_t * lv_demo_high_res(const char * assets_path,
42                                           const char * logo_path,
43                                           const char * slides_path,
44                                           lv_demo_high_res_exit_cb_t exit_cb)
45 {
46     if(assets_path == NULL) assets_path = "lvgl/demos/high_res/assets";
47     if(logo_path == NULL) logo_path = "lvgl/demos/high_res/assets/img_lv_demo_high_res_lvgl_logo.png";
48     if(slides_path == NULL) slides_path = "about_app_slides";
49     lv_obj_t * base_obj = lv_demo_high_res_base_obj_create(assets_path, logo_path, slides_path, exit_cb);
50     lv_demo_high_res_home(base_obj);
51 
52     lv_demo_high_res_ctx_t * c = lv_obj_get_user_data(base_obj);
53     return &c->api;
54 }
55 
56 /**********************
57  *   STATIC FUNCTIONS
58  **********************/
59 
60 #endif /*LV_USE_DEMO_HIGH_RES*/
61