lcd: Support rotation SSD1306 and changed example for using LVGL port component.

This commit is contained in:
Vilem Zavodny
2022-11-03 09:04:26 +01:00
parent c645c9ba06
commit 8631e4544b
3 changed files with 45 additions and 81 deletions

View File

@@ -12,6 +12,7 @@ void example_lvgl_demo_ui(lv_disp_t *disp)
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.");
lv_obj_set_width(label, 128);
/* 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);
lv_obj_align(label, LV_ALIGN_TOP_MID, 0, 0);
}