2022-01-14 02:02:07 -05:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: CC0-1.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "lvgl.h"
|
|
|
|
|
2022-07-29 03:54:56 -04:00
|
|
|
void example_lvgl_demo_ui(lv_disp_t *disp)
|
2022-01-14 02:02:07 -05:00
|
|
|
{
|
2022-07-29 03:54:56 -04:00
|
|
|
lv_obj_t *scr = lv_disp_get_scr_act(disp);
|
2022-01-14 02:02:07 -05:00
|
|
|
lv_obj_t *label = lv_label_create(scr);
|
|
|
|
lv_label_set_long_mode(label, LV_LABEL_LONG_SCROLL_CIRCULAR); /* Circular scroll */
|
|
|
|
lv_label_set_text(label, "Hello Espressif, Hello LVGL.");
|
2022-11-03 04:04:26 -04:00
|
|
|
/* Size of the screen (if you use rotation 90 or 270, please set disp->driver->ver_res) */
|
|
|
|
lv_obj_set_width(label, disp->driver->hor_res);
|
2022-01-14 02:02:07 -05:00
|
|
|
lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0);
|
|
|
|
}
|