├── .cproject
├── .gitignore
├── .gitmodules
├── .settings
├── language.settings.xml
└── org.eclipse.cdt.core.prefs
├── CMakeLists.txt
├── LICENSE
├── Makefile
├── PRECONFIGURED_KITS.md
├── README.md
├── components
├── lv_examples
│ ├── CMakeLists.txt
│ ├── Kconfig
│ ├── component.mk
│ ├── lv_ex_conf.h
│ └── lv_examples
│ │ ├── .github
│ │ ├── auto-comment.yml
│ │ ├── stale.yml
│ │ └── workflows
│ │ │ └── deploy.yml
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── assets
│ │ ├── blue_flower_32.bin
│ │ ├── img_cogwheel_argb.bin
│ │ ├── img_cogwheel_rgb565.bin
│ │ ├── img_hand_argb.bin
│ │ ├── img_hand_rgb565.bin
│ │ ├── imgbtn_blue_argb.bin
│ │ ├── imgbtn_blue_rgb565.bin
│ │ ├── imgbtn_green_argb.bin
│ │ └── imgbtn_green_rgb565.bin
│ │ ├── docs
│ │ └── LICENSE.md
│ │ ├── library.properties
│ │ ├── lv_ex_conf_template.h
│ │ ├── lv_examples.h
│ │ ├── lv_examples.mk
│ │ ├── scripts
│ │ ├── build_all_examples.sh
│ │ ├── examples.txt
│ │ └── genexamplestxt.sh
│ │ └── src
│ │ ├── assets
│ │ ├── img_cogwheel_alpha16.c
│ │ ├── img_cogwheel_argb.c
│ │ ├── img_cogwheel_argb.png
│ │ ├── img_cogwheel_chroma_keyed.c
│ │ ├── img_cogwheel_chroma_keyed.png
│ │ ├── img_cogwheel_indexed16.c
│ │ ├── img_cogwheel_indexed16.png
│ │ ├── img_cogwheel_rgb.c
│ │ ├── img_cogwheel_rgb.png
│ │ ├── img_hand.c
│ │ ├── img_hand.png
│ │ ├── lv_font_montserrat_12_compr_az.c
│ │ ├── lv_font_montserrat_16_compr_az.c
│ │ └── lv_font_montserrat_28_compr_az.c
│ │ ├── header.py
│ │ ├── lv_demo_benchmark
│ │ ├── README.md
│ │ ├── lv_demo_benchmark.c
│ │ ├── lv_demo_benchmark.h
│ │ ├── screenshot1.png
│ │ └── screenshot2.png
│ │ ├── lv_demo_keypad_encoder
│ │ ├── README.md
│ │ ├── lv_demo_keypad_encoder.c
│ │ ├── lv_demo_keypad_encoder.h
│ │ ├── screenshot1.gif
│ │ └── screenshot1.png
│ │ ├── lv_demo_music
│ │ ├── README.md
│ │ ├── assets
│ │ │ ├── __pycache__
│ │ │ │ └── spectrum.cpython-36.pyc
│ │ │ ├── img_lv_demo_music_btn_list_pause.c
│ │ │ ├── img_lv_demo_music_btn_list_play.c
│ │ │ ├── img_lv_demo_music_btn_loop.c
│ │ │ ├── img_lv_demo_music_btn_next.c
│ │ │ ├── img_lv_demo_music_btn_pause.c
│ │ │ ├── img_lv_demo_music_btn_play.c
│ │ │ ├── img_lv_demo_music_btn_prev.c
│ │ │ ├── img_lv_demo_music_btn_rnd.c
│ │ │ ├── img_lv_demo_music_corner_left.c
│ │ │ ├── img_lv_demo_music_corner_right.c
│ │ │ ├── img_lv_demo_music_cover_1.c
│ │ │ ├── img_lv_demo_music_cover_2.c
│ │ │ ├── img_lv_demo_music_cover_3.c
│ │ │ ├── img_lv_demo_music_icon_1.c
│ │ │ ├── img_lv_demo_music_icon_2.c
│ │ │ ├── img_lv_demo_music_icon_3.c
│ │ │ ├── img_lv_demo_music_icon_4.c
│ │ │ ├── img_lv_demo_music_list_border.c
│ │ │ ├── img_lv_demo_music_logo.c
│ │ │ ├── img_lv_demo_music_slider_knob.c
│ │ │ ├── img_lv_demo_music_wave_bottom.c
│ │ │ ├── img_lv_demo_music_wave_top.c
│ │ │ ├── lv_demo_music_font_16_bold.c
│ │ │ ├── spectrum.py
│ │ │ ├── spectrum_1.h
│ │ │ ├── spectrum_2.h
│ │ │ └── spectrum_3.h
│ │ ├── lv_demo_music.c
│ │ ├── lv_demo_music.h
│ │ ├── lv_demo_music_list.c
│ │ ├── lv_demo_music_list.h
│ │ ├── lv_demo_music_main.c
│ │ ├── lv_demo_music_main.h
│ │ └── screenshot1.gif
│ │ ├── lv_demo_printer
│ │ ├── README.md
│ │ ├── images
│ │ │ ├── lv_demo_printer_icon_bright.c
│ │ │ ├── lv_demo_printer_icon_eco.c
│ │ │ ├── lv_demo_printer_icon_hue.c
│ │ │ ├── lv_demo_printer_icon_pc.c
│ │ │ ├── lv_demo_printer_icon_tel.c
│ │ │ ├── lv_demo_printer_icon_wifi.c
│ │ │ ├── lv_demo_printer_img_btn_bg_1.c
│ │ │ ├── lv_demo_printer_img_btn_bg_2.c
│ │ │ ├── lv_demo_printer_img_btn_bg_3.c
│ │ │ ├── lv_demo_printer_img_btn_bg_4.c
│ │ │ ├── lv_demo_printer_img_cloud.c
│ │ │ ├── lv_demo_printer_img_copy.c
│ │ │ ├── lv_demo_printer_img_internet.c
│ │ │ ├── lv_demo_printer_img_mobile.c
│ │ │ ├── lv_demo_printer_img_no_internet.c
│ │ │ ├── lv_demo_printer_img_phone.c
│ │ │ ├── lv_demo_printer_img_print.c
│ │ │ ├── lv_demo_printer_img_printer2.c
│ │ │ ├── lv_demo_printer_img_ready.c
│ │ │ ├── lv_demo_printer_img_scan.c
│ │ │ ├── lv_demo_printer_img_scan_example.c
│ │ │ ├── lv_demo_printer_img_setup.c
│ │ │ ├── lv_demo_printer_img_usb.c
│ │ │ └── lv_demo_printer_img_wave.c
│ │ ├── lv_demo_printer.c
│ │ ├── lv_demo_printer.h
│ │ ├── lv_demo_printer_theme.c
│ │ ├── lv_demo_printer_theme.h
│ │ ├── screenshot1.gif
│ │ └── screenshot1.png
│ │ ├── lv_demo_stress
│ │ ├── README.md
│ │ ├── lv_demo_stress.c
│ │ ├── lv_demo_stress.h
│ │ ├── screenshot1.gif
│ │ └── screenshot1.png
│ │ ├── lv_demo_widgets
│ │ ├── lv_demo_widgets.c
│ │ ├── lv_demo_widgets.h
│ │ ├── lv_demo_widgets.py
│ │ ├── screenshot1.gif
│ │ └── screenshot1.png
│ │ ├── lv_ex_get_started
│ │ ├── lv_ex_get_started.h
│ │ ├── lv_ex_get_started_1.c
│ │ ├── lv_ex_get_started_1.png
│ │ ├── lv_ex_get_started_1.py
│ │ ├── lv_ex_get_started_2.c
│ │ ├── lv_ex_get_started_2.png
│ │ ├── lv_ex_get_started_2.py
│ │ ├── lv_ex_get_started_3.c
│ │ ├── lv_ex_get_started_3.png
│ │ └── lv_ex_get_started_3.py
│ │ ├── lv_ex_style
│ │ ├── lv_ex_style.h
│ │ ├── lv_ex_style_1.c
│ │ ├── lv_ex_style_1.png
│ │ ├── lv_ex_style_1.py
│ │ ├── lv_ex_style_10.c
│ │ ├── lv_ex_style_10.png
│ │ ├── lv_ex_style_10.py
│ │ ├── lv_ex_style_11.c
│ │ ├── lv_ex_style_11.png
│ │ ├── lv_ex_style_11.py
│ │ ├── lv_ex_style_2.c
│ │ ├── lv_ex_style_2.png
│ │ ├── lv_ex_style_2.py
│ │ ├── lv_ex_style_3.c
│ │ ├── lv_ex_style_3.png
│ │ ├── lv_ex_style_3.py
│ │ ├── lv_ex_style_4.c
│ │ ├── lv_ex_style_4.png
│ │ ├── lv_ex_style_4.py
│ │ ├── lv_ex_style_5.c
│ │ ├── lv_ex_style_5.png
│ │ ├── lv_ex_style_5.py
│ │ ├── lv_ex_style_6.c
│ │ ├── lv_ex_style_6.png
│ │ ├── lv_ex_style_6.py
│ │ ├── lv_ex_style_7.c
│ │ ├── lv_ex_style_7.png
│ │ ├── lv_ex_style_7.py
│ │ ├── lv_ex_style_8.c
│ │ ├── lv_ex_style_8.png
│ │ ├── lv_ex_style_8.py
│ │ ├── lv_ex_style_9.c
│ │ ├── lv_ex_style_9.png
│ │ ├── lv_ex_style_9.py
│ │ └── lv_ex_style_9_png.py
│ │ ├── lv_ex_widgets
│ │ ├── lv_ex_arc
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_arc_1.c
│ │ │ ├── lv_ex_arc_1.png
│ │ │ ├── lv_ex_arc_1.py
│ │ │ ├── lv_ex_arc_2.c
│ │ │ ├── lv_ex_arc_2.png
│ │ │ └── lv_ex_arc_2.py
│ │ ├── lv_ex_bar
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_bar_1.c
│ │ │ ├── lv_ex_bar_1.png
│ │ │ └── lv_ex_bar_1.py
│ │ ├── lv_ex_btn
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_btn_1.c
│ │ │ ├── lv_ex_btn_1.png
│ │ │ ├── lv_ex_btn_1.py
│ │ │ ├── lv_ex_btn_2.c
│ │ │ ├── lv_ex_btn_2.png
│ │ │ └── lv_ex_btn_2.py
│ │ ├── lv_ex_btnmatrix
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_btnmatrix_1.c
│ │ │ ├── lv_ex_btnmatrix_1.png
│ │ │ └── lv_ex_btnmatrix_1.py
│ │ ├── lv_ex_calendar
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_calendar_1.c
│ │ │ ├── lv_ex_calendar_1.png
│ │ │ └── lv_ex_calendar_1.py
│ │ ├── lv_ex_canvas
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_canvas_1.c
│ │ │ ├── lv_ex_canvas_1.png
│ │ │ ├── lv_ex_canvas_1.py
│ │ │ ├── lv_ex_canvas_2.c
│ │ │ ├── lv_ex_canvas_2.png
│ │ │ └── lv_ex_canvas_2.py
│ │ ├── lv_ex_chart
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_chart_1.c
│ │ │ ├── lv_ex_chart_1.png
│ │ │ ├── lv_ex_chart_1.py
│ │ │ ├── lv_ex_chart_2.c
│ │ │ ├── lv_ex_chart_2.png
│ │ │ └── lv_ex_chart_2.py
│ │ ├── lv_ex_checkbox
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_checkbox_1.c
│ │ │ ├── lv_ex_checkbox_1.png
│ │ │ └── lv_ex_checkbox_1.py
│ │ ├── lv_ex_cont
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_cont_1.c
│ │ │ ├── lv_ex_cont_1.png
│ │ │ └── lv_ex_cont_1.py
│ │ ├── lv_ex_cpicker
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_cpicker_1.c
│ │ │ ├── lv_ex_cpicker_1.png
│ │ │ ├── lv_ex_cpicker_1.py
│ │ │ ├── lv_ex_cpicker_2.c
│ │ │ ├── lv_ex_cpicker_2.png
│ │ │ └── lv_ex_cpicker_2.py
│ │ ├── lv_ex_dropdown
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_dropdown_1.c
│ │ │ ├── lv_ex_dropdown_1.png
│ │ │ ├── lv_ex_dropdown_1.py
│ │ │ ├── lv_ex_dropdown_2.c
│ │ │ ├── lv_ex_dropdown_2.png
│ │ │ └── lv_ex_dropdown_2.py
│ │ ├── lv_ex_gauge
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_gauge_1.c
│ │ │ ├── lv_ex_gauge_1.png
│ │ │ ├── lv_ex_gauge_1.py
│ │ │ ├── lv_ex_gauge_2.c
│ │ │ ├── lv_ex_gauge_2.png
│ │ │ ├── lv_ex_gauge_2.py
│ │ │ └── lv_ex_gauge_2_png.py
│ │ ├── lv_ex_img
│ │ │ ├── ex1_img.py
│ │ │ ├── ex1_img_png.py
│ │ │ ├── ex2_img.py
│ │ │ ├── ex2_img_png.py
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_img_1.c
│ │ │ ├── lv_ex_img_1.png
│ │ │ ├── lv_ex_img_1.py
│ │ │ ├── lv_ex_img_2.c
│ │ │ ├── lv_ex_img_2.png
│ │ │ ├── lv_ex_img_2.py
│ │ │ ├── lv_ex_img_3.c
│ │ │ └── lv_ex_img_3.png
│ │ ├── lv_ex_imgbtn
│ │ │ ├── imgbtn_blue.c
│ │ │ ├── imgbtn_green.c
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_imgbtn_1.c
│ │ │ ├── lv_ex_imgbtn_1.png
│ │ │ └── lv_ex_imgbtn_1.py
│ │ ├── lv_ex_keyboard
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_keyboard_1.c
│ │ │ ├── lv_ex_keyboard_1.png
│ │ │ └── lv_ex_keyboard_1.py
│ │ ├── lv_ex_label
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_label_1.c
│ │ │ ├── lv_ex_label_1.png
│ │ │ ├── lv_ex_label_1.py
│ │ │ ├── lv_ex_label_2.c
│ │ │ ├── lv_ex_label_2.png
│ │ │ ├── lv_ex_label_2.py
│ │ │ ├── lv_ex_label_3.c
│ │ │ ├── lv_ex_label_3.png
│ │ │ └── lv_ex_label_3.py
│ │ ├── lv_ex_led
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_led_1.c
│ │ │ ├── lv_ex_led_1.png
│ │ │ └── lv_ex_led_1.py
│ │ ├── lv_ex_line
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_line_1.c
│ │ │ ├── lv_ex_line_1.png
│ │ │ └── lv_ex_line_1.py
│ │ ├── lv_ex_linemeter
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_linemeter_1.c
│ │ │ ├── lv_ex_linemeter_1.png
│ │ │ └── lv_ex_linemeter_1.py
│ │ ├── lv_ex_list
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_list_1.c
│ │ │ ├── lv_ex_list_1.png
│ │ │ └── lv_ex_list_1.py
│ │ ├── lv_ex_msgbox
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_msgbox_1.c
│ │ │ ├── lv_ex_msgbox_1.png
│ │ │ ├── lv_ex_msgbox_1.py
│ │ │ ├── lv_ex_msgbox_2.c
│ │ │ ├── lv_ex_msgbox_2.png
│ │ │ └── lv_ex_msgbox_2.py
│ │ ├── lv_ex_obj
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_obj_1.c
│ │ │ ├── lv_ex_obj_1.png
│ │ │ └── lv_ex_obj_1.py
│ │ ├── lv_ex_objmask
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_objmask_1.c
│ │ │ ├── lv_ex_objmask_1.png
│ │ │ ├── lv_ex_objmask_1.py
│ │ │ ├── lv_ex_objmask_2.c
│ │ │ ├── lv_ex_objmask_2.png
│ │ │ └── lv_ex_objmask_2.py
│ │ ├── lv_ex_page
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_page_1.c
│ │ │ ├── lv_ex_page_1.png
│ │ │ ├── lv_ex_page_1.py
│ │ │ └── lv_ex_page_2.py
│ │ ├── lv_ex_roller
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_roller_1.c
│ │ │ ├── lv_ex_roller_1.png
│ │ │ └── lv_ex_roller_1.py
│ │ ├── lv_ex_slider
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_slider_1.c
│ │ │ ├── lv_ex_slider_1.png
│ │ │ ├── lv_ex_slider_1.py
│ │ │ ├── lv_ex_slider_2.c
│ │ │ ├── lv_ex_slider_2.png
│ │ │ └── lv_ex_slider_2.py
│ │ ├── lv_ex_spinbox
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_spinbox_1.c
│ │ │ ├── lv_ex_spinbox_1.png
│ │ │ └── lv_ex_spinbox_1.py
│ │ ├── lv_ex_spinner
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_spinner_1.c
│ │ │ ├── lv_ex_spinner_1.png
│ │ │ └── lv_ex_spinner_1.py
│ │ ├── lv_ex_switch
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_switch_1.c
│ │ │ ├── lv_ex_switch_1.png
│ │ │ └── lv_ex_switch_1.py
│ │ ├── lv_ex_table
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_table_1.c
│ │ │ ├── lv_ex_table_1.png
│ │ │ └── lv_ex_table_1.py
│ │ ├── lv_ex_tabview
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_tabview_1.c
│ │ │ ├── lv_ex_tabview_1.png
│ │ │ └── lv_ex_tabview_1.py
│ │ ├── lv_ex_textarea
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_textarea_1.c
│ │ │ ├── lv_ex_textarea_1.png
│ │ │ ├── lv_ex_textarea_1.py
│ │ │ ├── lv_ex_textarea_2.c
│ │ │ ├── lv_ex_textarea_2.png
│ │ │ ├── lv_ex_textarea_2.py
│ │ │ ├── lv_ex_textarea_3.c
│ │ │ ├── lv_ex_textarea_3.png
│ │ │ └── lv_ex_textarea_3.py
│ │ ├── lv_ex_tileview
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_tileview_1.c
│ │ │ ├── lv_ex_tileview_1.png
│ │ │ └── lv_ex_tileview_1.py
│ │ ├── lv_ex_widgets.h
│ │ └── lv_ex_win
│ │ │ ├── index.rst
│ │ │ ├── lv_ex_win_1.c
│ │ │ ├── lv_ex_win_1.png
│ │ │ └── lv_ex_win_1.py
│ │ └── lv_examples.h
├── lvgl
│ ├── .editorconfig
│ ├── .github
│ │ ├── FUNDING.yml
│ │ ├── ISSUE_TEMPLATE
│ │ │ ├── bug-report.md
│ │ │ ├── config.yml
│ │ │ └── dev-discussion.md
│ │ ├── auto-comment.yml
│ │ ├── pull_request_template.md
│ │ ├── stale.yml
│ │ └── workflows
│ │ │ ├── build_micropython.yml
│ │ │ ├── ccpp.yml
│ │ │ ├── main.yml
│ │ │ ├── merge-to-dev.yml
│ │ │ └── release.yml
│ ├── .gitignore
│ ├── .gitmodules
│ ├── CHANGELOG.md
│ ├── CMakeLists.txt
│ ├── Kconfig
│ ├── LICENCE.txt
│ ├── README.md
│ ├── component.mk
│ ├── docs
│ │ ├── CODE_OF_CONDUCT.md
│ │ ├── CODING_STYLE.md
│ │ ├── CONTRIBUTING.md
│ │ └── ROADMAP.md
│ ├── examples
│ │ ├── LVGL_Arduino.ino
│ │ └── porting
│ │ │ ├── lv_port_disp_template.c
│ │ │ ├── lv_port_disp_template.h
│ │ │ ├── lv_port_fs_template.c
│ │ │ ├── lv_port_fs_template.h
│ │ │ ├── lv_port_indev_template.c
│ │ │ └── lv_port_indev_template.h
│ ├── library.json
│ ├── library.properties
│ ├── lv_conf_template.h
│ ├── lvgl.h
│ ├── lvgl.mk
│ ├── scripts
│ │ ├── Doxyfile
│ │ ├── built_in_font
│ │ │ ├── DejaVuSans.ttf
│ │ │ ├── FontAwesome5-Solid+Brands+Regular.woff
│ │ │ ├── Montserrat-Medium.ttf
│ │ │ ├── SimSun.woff
│ │ │ ├── built_in_font_gen.py
│ │ │ └── generate_all.py
│ │ ├── code-format.cfg
│ │ ├── code-format.sh
│ │ ├── cppcheck_run.sh
│ │ ├── infer_run.sh
│ │ ├── lv_conf_checker.py
│ │ └── release
│ │ │ ├── com.py
│ │ │ ├── dev.py
│ │ │ ├── main.py
│ │ │ ├── proj.py
│ │ │ └── release.py
│ ├── src
│ │ ├── lv_api_map.h
│ │ ├── lv_conf_internal.h
│ │ ├── lv_conf_kconfig.h
│ │ ├── lv_core
│ │ │ ├── lv_core.mk
│ │ │ ├── lv_disp.c
│ │ │ ├── lv_disp.h
│ │ │ ├── lv_group.c
│ │ │ ├── lv_group.h
│ │ │ ├── lv_indev.c
│ │ │ ├── lv_indev.h
│ │ │ ├── lv_obj.c
│ │ │ ├── lv_obj.h
│ │ │ ├── lv_obj_style_dec.h
│ │ │ ├── lv_refr.c
│ │ │ ├── lv_refr.h
│ │ │ ├── lv_style.c
│ │ │ └── lv_style.h
│ │ ├── lv_draw
│ │ │ ├── lv_draw.h
│ │ │ ├── lv_draw.mk
│ │ │ ├── lv_draw_arc.c
│ │ │ ├── lv_draw_arc.h
│ │ │ ├── lv_draw_blend.c
│ │ │ ├── lv_draw_blend.h
│ │ │ ├── lv_draw_img.c
│ │ │ ├── lv_draw_img.h
│ │ │ ├── lv_draw_label.c
│ │ │ ├── lv_draw_label.h
│ │ │ ├── lv_draw_line.c
│ │ │ ├── lv_draw_line.h
│ │ │ ├── lv_draw_mask.c
│ │ │ ├── lv_draw_mask.h
│ │ │ ├── lv_draw_rect.c
│ │ │ ├── lv_draw_rect.h
│ │ │ ├── lv_draw_triangle.c
│ │ │ ├── lv_draw_triangle.h
│ │ │ ├── lv_img_buf.c
│ │ │ ├── lv_img_buf.h
│ │ │ ├── lv_img_cache.c
│ │ │ ├── lv_img_cache.h
│ │ │ ├── lv_img_decoder.c
│ │ │ └── lv_img_decoder.h
│ │ ├── lv_font
│ │ │ ├── lv_font.c
│ │ │ ├── lv_font.h
│ │ │ ├── lv_font.mk
│ │ │ ├── lv_font_dejavu_16_persian_hebrew.c
│ │ │ ├── lv_font_fmt_txt.c
│ │ │ ├── lv_font_fmt_txt.h
│ │ │ ├── lv_font_loader.c
│ │ │ ├── lv_font_loader.h
│ │ │ ├── lv_font_montserrat_10.c
│ │ │ ├── lv_font_montserrat_12.c
│ │ │ ├── lv_font_montserrat_12_subpx.c
│ │ │ ├── lv_font_montserrat_14.c
│ │ │ ├── lv_font_montserrat_16.c
│ │ │ ├── lv_font_montserrat_18.c
│ │ │ ├── lv_font_montserrat_20.c
│ │ │ ├── lv_font_montserrat_22.c
│ │ │ ├── lv_font_montserrat_24.c
│ │ │ ├── lv_font_montserrat_26.c
│ │ │ ├── lv_font_montserrat_28.c
│ │ │ ├── lv_font_montserrat_28_compressed.c
│ │ │ ├── lv_font_montserrat_30.c
│ │ │ ├── lv_font_montserrat_32.c
│ │ │ ├── lv_font_montserrat_34.c
│ │ │ ├── lv_font_montserrat_36.c
│ │ │ ├── lv_font_montserrat_38.c
│ │ │ ├── lv_font_montserrat_40.c
│ │ │ ├── lv_font_montserrat_42.c
│ │ │ ├── lv_font_montserrat_44.c
│ │ │ ├── lv_font_montserrat_46.c
│ │ │ ├── lv_font_montserrat_48.c
│ │ │ ├── lv_font_montserrat_8.c
│ │ │ ├── lv_font_simsun_16_cjk.c
│ │ │ ├── lv_font_unscii_16.c
│ │ │ ├── lv_font_unscii_8.c
│ │ │ └── lv_symbol_def.h
│ │ ├── lv_gpu
│ │ │ ├── lv_gpu.mk
│ │ │ ├── lv_gpu_nxp_pxp.c
│ │ │ ├── lv_gpu_nxp_pxp.h
│ │ │ ├── lv_gpu_nxp_pxp_osa.c
│ │ │ ├── lv_gpu_nxp_pxp_osa.h
│ │ │ ├── lv_gpu_nxp_vglite.c
│ │ │ ├── lv_gpu_nxp_vglite.h
│ │ │ ├── lv_gpu_stm32_dma2d.c
│ │ │ └── lv_gpu_stm32_dma2d.h
│ │ ├── lv_hal
│ │ │ ├── lv_hal.h
│ │ │ ├── lv_hal.mk
│ │ │ ├── lv_hal_disp.c
│ │ │ ├── lv_hal_disp.h
│ │ │ ├── lv_hal_indev.c
│ │ │ ├── lv_hal_indev.h
│ │ │ ├── lv_hal_tick.c
│ │ │ └── lv_hal_tick.h
│ │ ├── lv_misc
│ │ │ ├── lv_anim.c
│ │ │ ├── lv_anim.h
│ │ │ ├── lv_area.c
│ │ │ ├── lv_area.h
│ │ │ ├── lv_async.c
│ │ │ ├── lv_async.h
│ │ │ ├── lv_bidi.c
│ │ │ ├── lv_bidi.h
│ │ │ ├── lv_color.c
│ │ │ ├── lv_color.h
│ │ │ ├── lv_debug.c
│ │ │ ├── lv_debug.h
│ │ │ ├── lv_fs.c
│ │ │ ├── lv_fs.h
│ │ │ ├── lv_gc.c
│ │ │ ├── lv_gc.h
│ │ │ ├── lv_ll.c
│ │ │ ├── lv_ll.h
│ │ │ ├── lv_log.c
│ │ │ ├── lv_log.h
│ │ │ ├── lv_math.c
│ │ │ ├── lv_math.h
│ │ │ ├── lv_mem.c
│ │ │ ├── lv_mem.h
│ │ │ ├── lv_misc.mk
│ │ │ ├── lv_printf.c
│ │ │ ├── lv_printf.h
│ │ │ ├── lv_task.c
│ │ │ ├── lv_task.h
│ │ │ ├── lv_templ.c
│ │ │ ├── lv_templ.h
│ │ │ ├── lv_txt.c
│ │ │ ├── lv_txt.h
│ │ │ ├── lv_txt_ap.c
│ │ │ ├── lv_txt_ap.h
│ │ │ ├── lv_types.h
│ │ │ ├── lv_utils.c
│ │ │ └── lv_utils.h
│ │ ├── lv_themes
│ │ │ ├── lv_theme.c
│ │ │ ├── lv_theme.h
│ │ │ ├── lv_theme_empty.c
│ │ │ ├── lv_theme_empty.h
│ │ │ ├── lv_theme_material.c
│ │ │ ├── lv_theme_material.h
│ │ │ ├── lv_theme_mono.c
│ │ │ ├── lv_theme_mono.h
│ │ │ ├── lv_theme_template.c
│ │ │ ├── lv_theme_template.h
│ │ │ └── lv_themes.mk
│ │ ├── lv_widgets
│ │ │ ├── lv_arc.c
│ │ │ ├── lv_arc.h
│ │ │ ├── lv_bar.c
│ │ │ ├── lv_bar.h
│ │ │ ├── lv_btn.c
│ │ │ ├── lv_btn.h
│ │ │ ├── lv_btnmatrix.c
│ │ │ ├── lv_btnmatrix.h
│ │ │ ├── lv_calendar.c
│ │ │ ├── lv_calendar.h
│ │ │ ├── lv_canvas.c
│ │ │ ├── lv_canvas.h
│ │ │ ├── lv_chart.c
│ │ │ ├── lv_chart.h
│ │ │ ├── lv_checkbox.c
│ │ │ ├── lv_checkbox.h
│ │ │ ├── lv_cont.c
│ │ │ ├── lv_cont.h
│ │ │ ├── lv_cpicker.c
│ │ │ ├── lv_cpicker.h
│ │ │ ├── lv_dropdown.c
│ │ │ ├── lv_dropdown.h
│ │ │ ├── lv_gauge.c
│ │ │ ├── lv_gauge.h
│ │ │ ├── lv_img.c
│ │ │ ├── lv_img.h
│ │ │ ├── lv_imgbtn.c
│ │ │ ├── lv_imgbtn.h
│ │ │ ├── lv_keyboard.c
│ │ │ ├── lv_keyboard.h
│ │ │ ├── lv_label.c
│ │ │ ├── lv_label.h
│ │ │ ├── lv_led.c
│ │ │ ├── lv_led.h
│ │ │ ├── lv_line.c
│ │ │ ├── lv_line.h
│ │ │ ├── lv_linemeter.c
│ │ │ ├── lv_linemeter.h
│ │ │ ├── lv_list.c
│ │ │ ├── lv_list.h
│ │ │ ├── lv_msgbox.c
│ │ │ ├── lv_msgbox.h
│ │ │ ├── lv_objmask.c
│ │ │ ├── lv_objmask.h
│ │ │ ├── lv_objx_templ.c
│ │ │ ├── lv_objx_templ.h
│ │ │ ├── lv_page.c
│ │ │ ├── lv_page.h
│ │ │ ├── lv_roller.c
│ │ │ ├── lv_roller.h
│ │ │ ├── lv_slider.c
│ │ │ ├── lv_slider.h
│ │ │ ├── lv_spinbox.c
│ │ │ ├── lv_spinbox.h
│ │ │ ├── lv_spinner.c
│ │ │ ├── lv_spinner.h
│ │ │ ├── lv_switch.c
│ │ │ ├── lv_switch.h
│ │ │ ├── lv_table.c
│ │ │ ├── lv_table.h
│ │ │ ├── lv_tabview.c
│ │ │ ├── lv_tabview.h
│ │ │ ├── lv_textarea.c
│ │ │ ├── lv_textarea.h
│ │ │ ├── lv_tileview.c
│ │ │ ├── lv_tileview.h
│ │ │ ├── lv_widgets.mk
│ │ │ ├── lv_win.c
│ │ │ └── lv_win.h
│ │ └── lvgl.h
│ ├── tests
│ │ ├── Makefile
│ │ ├── build.py
│ │ ├── font_1.fnt
│ │ ├── font_2.fnt
│ │ ├── font_3.fnt
│ │ ├── icon.png
│ │ ├── icon2.png
│ │ ├── lv_test_assert.c
│ │ ├── lv_test_assert.h
│ │ ├── lv_test_conf.h
│ │ ├── lv_test_core
│ │ │ ├── lv_test_core.c
│ │ │ ├── lv_test_core.h
│ │ │ ├── lv_test_font_loader.c
│ │ │ ├── lv_test_font_loader.h
│ │ │ ├── lv_test_obj.c
│ │ │ ├── lv_test_obj.h
│ │ │ ├── lv_test_style.c
│ │ │ └── lv_test_style.h
│ │ ├── lv_test_fonts
│ │ │ ├── font_1.c
│ │ │ ├── font_2.c
│ │ │ └── font_3.c
│ │ ├── lv_test_main.c
│ │ ├── lv_test_ref_imgs
│ │ │ └── lv_test_img32_label_1.png
│ │ └── lv_test_widgets
│ │ │ ├── lv_test_label.c
│ │ │ └── lv_test_label.h
│ └── zephyr
│ │ └── module.yml
└── lvgl_esp32_drivers
│ ├── .editorconfig
│ ├── .github
│ └── auto-comment.yml
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── CONTRIBUTE_CONTROLLER_SUPPORT.md
│ ├── Kconfig
│ ├── LICENSE
│ ├── README.md
│ ├── component.mk
│ ├── lvgl_helpers.c
│ ├── lvgl_helpers.h
│ ├── lvgl_i2c_conf.h
│ ├── lvgl_spi_conf.h
│ ├── lvgl_tft
│ ├── EVE.h
│ ├── EVE_commands.c
│ ├── EVE_commands.h
│ ├── EVE_config.h
│ ├── FT81x.c
│ ├── FT81x.h
│ ├── GC9A01.c
│ ├── GC9A01.h
│ ├── Kconfig
│ ├── disp_driver.c
│ ├── disp_driver.h
│ ├── disp_spi.c
│ ├── disp_spi.h
│ ├── hx8357.c
│ ├── hx8357.h
│ ├── il3820.c
│ ├── il3820.h
│ ├── ili9341.c
│ ├── ili9341.h
│ ├── ili9481.c
│ ├── ili9481.h
│ ├── ili9486.c
│ ├── ili9486.h
│ ├── ili9488.c
│ ├── ili9488.h
│ ├── jd79653a.c
│ ├── jd79653a.h
│ ├── ra8875.c
│ ├── ra8875.h
│ ├── sh1107.c
│ ├── sh1107.h
│ ├── ssd1306.c
│ ├── ssd1306.h
│ ├── st7735s.c
│ ├── st7735s.h
│ ├── st7789.c
│ ├── st7789.h
│ ├── st7796s.c
│ ├── st7796s.h
│ ├── uc8151d.c
│ └── uc8151d.h
│ └── lvgl_touch
│ ├── FT81x.c
│ ├── FT81x.h
│ ├── Kconfig
│ ├── adcraw.c
│ ├── adcraw.h
│ ├── ft6x36.c
│ ├── ft6x36.h
│ ├── ra8875_touch.c
│ ├── ra8875_touch.h
│ ├── stmpe610.c
│ ├── stmpe610.h
│ ├── touch_driver.c
│ ├── touch_driver.h
│ ├── tp_i2c.c
│ ├── tp_i2c.h
│ ├── tp_spi.c
│ ├── tp_spi.h
│ ├── xpt2046.c
│ └── xpt2046.h
├── images
├── ESP32_DevkitV1_30_GPIO.png
├── esp_wrover_kit.jpg
├── m5stack.jpg
├── m5stick.jpg
├── m5stickc.jpg
├── menu-component.png
├── menu-lvgl.png
├── menu-main.png
├── menu-pins-tp.png
├── menu-pins.png
├── menu-predefined-displays.png
├── menu-predefined.png
├── new_lvgl_options.png
├── new_mono.jpg
├── new_photo.jpg
├── screenshot.jpg
├── sparkfun_adafruit.png
├── ssd1306_wemos_lolin.jpg
├── ssd1306_wemos_lolin_configuration.png
├── tft_backlight_control.png
├── tft_controllers_options.png
├── tft_display_controller.png
├── tft_pin_assignments.png
├── tft_predefined_board_pinouts.png
├── tft_predefined_display_config.png
├── tft_spi_bus.png
├── tft_width_height.png
├── touch_controllers_options.png
├── touch_menu.png
├── touch_pinout.png
├── touch_spi_bus.png
├── touch_touch_panel_config.png
└── vscode
│ ├── IMG_6019.jpg
│ ├── image-20210919092124499.png
│ ├── image-20210919092312209.png
│ ├── image-20210919092717028.png
│ ├── image-20210919092903917.png
│ └── image-20210919092938476.png
├── main
├── CMakeLists.txt
├── component.mk
└── main.c
├── scripts
├── code-format.cfg
└── run-code-format.sh
└── workspace.code-workspace
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Object files
5 | *.o
6 | *.ko
7 | *.obj
8 | *.elf
9 |
10 | # Linker output
11 | *.ilk
12 | *.map
13 | *.exp
14 |
15 | # Precompiled Headers
16 | *.gch
17 | *.pch
18 |
19 | # Libraries
20 | *.lib
21 | *.a
22 | *.la
23 | *.lo
24 |
25 | # Shared objects (inc. Windows DLLs)
26 | *.dll
27 | *.so
28 | *.so.*
29 | *.dylib
30 |
31 | # Executables
32 | *.exe
33 | *.out
34 | *.app
35 | *.i*86
36 | *.x86_64
37 | *.hex
38 |
39 | # Debug files
40 | *.dSYM/
41 | *.su
42 | *.idb
43 | *.pdb
44 |
45 | # Kernel Module Compile Results
46 | *.mod*
47 | *.cmd
48 | .tmp_versions/
49 | modules.order
50 | Module.symvers
51 | Mkfile.old
52 | dkms.conf
53 |
54 | # OS files
55 | .DS_Store
56 |
57 | build/
58 | sdkconfig.old
59 | sdkconfig
60 |
61 | # Jetbrains CLion IDE
62 | cmake-build-debug/
63 | .idea/
64 |
65 | # PlatformIO
66 | .pio/
67 | platformio.ini
68 |
69 | # VS Code
70 | .vscode/
71 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lv_examples"]
2 | path = components/lv_examples/lv_examples
3 | url = https://github.com/littlevgl/lv_examples.git
4 | branch = release/v7
5 | [submodule "components/lvgl_esp32_drivers"]
6 | path = components/lvgl_esp32_drivers
7 | url = https://github.com/lvgl/lvgl_esp32_drivers.git
8 | [submodule "components/lvgl"]
9 | path = components/lvgl
10 | url = https://github.com/lvgl/lvgl.git
11 |
--------------------------------------------------------------------------------
/.settings/language.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.cdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1013439379/append=true
3 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1013439379/appendContributed=true
4 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1257239843/V/delimiter=\:
5 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1257239843/V/operation=append
6 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1257239843/V/value=1
7 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1257239843/append=true
8 | environment/project/cdt.managedbuild.toolchain.gnu.cross.base.1257239843/appendContributed=true
9 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 | if (NOT DEFINED PROJECT_NAME)
4 | include($ENV{IDF_PATH}/tools/cmake/project.cmake)
5 | project(lvgl-demo)
6 | else()
7 | message(FATAL_ERROR "LV PORT ESP32: This must be a project's main CMakeLists.txt.")
8 | endif()
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Littlev Graphics Library
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | #
2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a
3 | # project subdirectory.
4 | #
5 |
6 | PROJECT_NAME := lvgl-demo
7 | include $(IDF_PATH)/make/project.mk
8 |
--------------------------------------------------------------------------------
/components/lv_examples/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(ESP_PLATFORM)
2 |
3 | file(GLOB_RECURSE SOURCES lv_examples/*.c)
4 |
5 | idf_component_register(SRCS ${SOURCES}
6 | INCLUDE_DIRS .
7 | REQUIRES lvgl)
8 |
9 | else()
10 | message(FATAL_ERROR "LVGL LV examples: ESP_PLATFORM is not defined. Try reinstalling ESP-IDF.")
11 | endif()
12 |
--------------------------------------------------------------------------------
/components/lv_examples/Kconfig:
--------------------------------------------------------------------------------
1 | # Kconfig for lv_examples v7.4.0
2 |
3 | menu "lv_examples configuration"
4 |
5 | config LV_EX_PRINTF
6 | bool "Enable printf-ing data in demos and examples."
7 |
8 | choice LV_EX_CHOICE
9 | prompt "Select the demo you want to run."
10 | default LV_USE_DEMO_WIDGETS
11 |
12 | config LV_USE_DEMO_WIDGETS
13 | bool "Show demo widgets."
14 |
15 | config LV_USE_DEMO_KEYPAD_AND_ENCODER
16 | bool "Demonstrate the usage of encoder and keyboard."
17 |
18 | config LV_USE_DEMO_BENCHMARK
19 | bool "Benchmark your system."
20 |
21 | config LV_USE_DEMO_STRESS
22 | bool "Stress test for LVGL."
23 | endchoice
24 |
25 | config LV_DEMO_WIDGETS_SLIDESHOW
26 | bool "Slide demo widgets automatically."
27 | depends on LV_USE_DEMO_WIDGETS
28 | default y
29 | endmenu
30 |
--------------------------------------------------------------------------------
/components/lv_examples/component.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Component Makefile
3 | #
4 |
5 | CFLAGS += -DLV_LVGL_H_INCLUDE_SIMPLE
6 |
7 | COMPONENT_SRCDIRS := lv_examples \
8 | lv_examples/src/lv_demo_benchmark \
9 | lv_examples/src/lv_demo_keypad_encoder \
10 | lv_examples/src/demo_stress \
11 | lv_examples/src/lv_demo_widgets \
12 | lv_examples/src/lv_ex_style \
13 | lv_examples/src/lv_ex_widgets \
14 | lv_examples/assets
15 |
16 | COMPONENT_ADD_INCLUDEDIRS := $(COMPONENT_SRCDIRS) .
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/.github/auto-comment.yml:
--------------------------------------------------------------------------------
1 | # Comment to a new issue.
2 | pullRequestOpened: |
3 | Thank you for raising your pull request.
4 |
5 | To ensure that all licensing criteria is met all repositories of the LVGL project apply a process called DCO (Developer's Certificate of Origin).
6 |
7 | The text of DCO can be read here: https://developercertificate.org/
8 | For a more detailed description see the [Documentation](https://docs.lvgl.io/latest/en/html/contributing/index.html#developer-certification-of-origin-dco) site.
9 |
10 | By contributing to any repositories of the LVGL project you state that your contribution corresponds with the DCO.
11 |
12 | No further action is required if your contribution fulfills the DCO. If you are not sure about it feel free to ask us in a comment.
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 21
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - architecture
8 | - pinned
9 | # Label to use when marking an issue as stale
10 | staleLabel: stale
11 | # Comment to post when marking an issue as stale. Set to `false` to disable
12 | markComment: >
13 | This issue or pull request has been automatically marked as stale because it has not had
14 | recent activity. It will be closed if no further activity occurs. Thank you
15 | for your contributions.
16 | # Comment to post when closing a stale issue. Set to `false` to disable
17 | closeComment: false
18 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/.gitignore:
--------------------------------------------------------------------------------
1 | **/*.o
2 | objs
3 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/blue_flower_32.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/blue_flower_32.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/img_cogwheel_argb.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/img_cogwheel_argb.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/img_cogwheel_rgb565.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/img_cogwheel_rgb565.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/img_hand_argb.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/img_hand_argb.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/img_hand_rgb565.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/img_hand_rgb565.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/imgbtn_blue_argb.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/imgbtn_blue_argb.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/imgbtn_blue_rgb565.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/imgbtn_blue_rgb565.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/imgbtn_green_argb.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/imgbtn_green_argb.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/assets/imgbtn_green_rgb565.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/assets/imgbtn_green_rgb565.bin
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/library.properties:
--------------------------------------------------------------------------------
1 | name=lv_examples
2 | version=7.8.1
3 | author=kisvegabor
4 | maintainer=kisvegabor,embeddedt
5 | sentence=Examples for LVGL grapics library
6 | paragraph=Demos and examples to see and try the features of LVGL embedded GUI library.
7 | category=Display
8 | url=https://lvgl.io
9 | architectures=*
10 | includes=lv_examples.h
11 | depends=lvgl
12 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/lv_examples.mk:
--------------------------------------------------------------------------------
1 | CSRCS += $(shell find -L lv_examples -name "*.c")
2 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/scripts/build_all_examples.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | mkdir -p objs
4 | cd objs
5 | echo "-- Updating builder ..."
6 | OBJS_DIR=`pwd`
7 | if ! [ -d builder ]; then
8 | git clone --quiet --recursive https://github.com/lvgl/lv_sim_emscripten.git builder
9 | cd builder
10 | else
11 | cd builder
12 | git pull --quiet
13 | fi
14 | cd lv_examples
15 | echo "-- Checking out lv_examples $GITHUB_SHA ..."
16 | git checkout $GITHUB_SHA
17 | cd ..
18 | echo "
Choose an example:
" > $OBJS_DIR/index.html
19 | cat $OBJS_DIR/../scripts/examples.txt | while read -r example_name; do
20 | echo "-- Building $example_name ..."
21 | make -j4 CHOSEN_DEMO=$example_name NO_GIT_HASH=1 || exit 1
22 | rm -rf $OBJS_DIR/$example_name
23 | cp -a build $OBJS_DIR/$example_name
24 | ex_py_name=$(find ../../src -name ${example_name}.py)
25 | if [ "x$ex_py_name" != "x" ]; then cp $ex_py_name $OBJS_DIR/$example_name/; fi
26 | echo "- $example_name
" >> $OBJS_DIR/index.html
27 | done
28 | echo "
" >> $OBJS_DIR/index.html
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/scripts/genexamplestxt.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | find src -name \*.h | xargs grep -h "void lv" | sed 's/(/ /g' | awk '{print $2}'
3 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/assets/img_cogwheel_argb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/assets/img_cogwheel_argb.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/assets/img_cogwheel_chroma_keyed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/assets/img_cogwheel_chroma_keyed.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/assets/img_cogwheel_indexed16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/assets/img_cogwheel_indexed16.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/assets/img_cogwheel_rgb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/assets/img_cogwheel_rgb.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/assets/img_hand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/assets/img_hand.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/header.py:
--------------------------------------------------------------------------------
1 | #!/opt/bin/lv_micropython -i
2 | import lvgl as lv
3 | import display_driver
4 | import time
5 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_benchmark/lv_demo_benchmark.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_benchmark.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_BENCHMARK_H
7 | #define LV_DEMO_BENCHMARK_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_demo_benchmark(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_DEMO_BENCHMARK_H*/
39 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_benchmark/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_benchmark/screenshot1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_benchmark/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_benchmark/screenshot2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/README.md:
--------------------------------------------------------------------------------
1 | # Keypad and Encoder demo
2 |
3 | ## Overview
4 |
5 | LVGL allows you to control the widgets with keypad and/or encoder without touchpad.
6 | This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad.
7 | Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/v7/en/html/overview/indev.html#keypad-and-encoder).
8 |
9 | 
10 |
11 | ## Run the demo
12 | - In `lv_ex_conf.h` set `LV_USE_DEMO_KEYPAD_AND_ENCODER 1`
13 | - After `lv_init()` and initializing the drivers call `lv_demo_keypad_encoder()`
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/lv_demo_keypad_encoder.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_keypad_encoder.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_KEYPAD_ENCODER_H
7 | #define LV_DEMO_KEYPAD_ENCODER_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_demo_keypad_encoder(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_DEMO_KEYPAD_ENCODER_H*/
39 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/screenshot1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/screenshot1.gif
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_keypad_encoder/screenshot1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/assets/__pycache__/spectrum.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_music/assets/__pycache__/spectrum.cpython-36.pyc
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/assets/spectrum.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import librosa
3 | import math
4 | import sys
5 |
6 | print("Loading file")
7 | audio, sample_rate = librosa.load(sys.argv[1], duration=60, offset=0, sr=15360)
8 |
9 | print("Getting spectrum")
10 | spectrum = librosa.stft(audio)
11 | S = np.abs(spectrum)
12 |
13 | fout = open("spectrum.h", "w")
14 |
15 | print("Writing file")
16 | fn = 36
17 | fs = int(len(S) / fn)
18 | fout.write("const uint16_t spectrum[][4] = {\n")
19 | for t in range(0,len(S[0]-1)):
20 | fout.write("{ ")
21 | f_prev = 0
22 | for f in [8, 45, 300, 600]:
23 | v = 0
24 | for i in range(f_prev, f): v += S[i][t]
25 | if v != 0: v = int(v/30)
26 | if v < 0: v = 0
27 | f_prev = f
28 | fout.write(str(int(v)) + ", ")
29 | fout.write("},\n")
30 | fout.write("};\n")
31 | fout.close()
32 |
33 | print("Finished")
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/lv_demo_music.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_music.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_MUSIC_H
7 | #define LV_DEMO_MUSIC_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../../lv_examples.h"
17 |
18 | #if LV_USE_DEMO_MUSIC
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 | #define LV_DEMO_MUSIC_LANDSCAPE (LV_HOR_RES_MAX > LV_VER_RES_MAX ? 1 : 0)
24 | #define LV_DEMO_LIST_CTRL_OVERLAP 60
25 |
26 | /**********************
27 | * TYPEDEFS
28 | **********************/
29 |
30 | /**********************
31 | * GLOBAL PROTOTYPES
32 | **********************/
33 |
34 | void lv_demo_music(void);
35 | const char * _lv_demo_music_get_title(uint32_t track_id);
36 | const char * _lv_demo_music_get_artist(uint32_t track_id);
37 | const char * _lv_demo_music_get_genre(uint32_t track_id);
38 | uint32_t _lv_demo_music_get_track_length(uint32_t track_id);
39 |
40 | /**********************
41 | * MACROS
42 | **********************/
43 |
44 | #endif /*LV_USE_DEMO_MUSIC*/
45 |
46 | #ifdef __cplusplus
47 | } /* extern "C" */
48 | #endif
49 |
50 | #endif /*LV_DEMO_MUSIC_H*/
51 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/lv_demo_music_list.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_music_list.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_MUSIC_LIST_H
7 | #define LV_DEMO_MUSIC_LIST_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_demo_music.h"
17 | #if LV_USE_DEMO_MUSIC
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 | lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent);
31 | void _lv_demo_music_list_btn_check(uint32_t track_id, bool state);
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 | #endif /*LV_USE_DEMO_MUSIC*/
38 |
39 | #ifdef __cplusplus
40 | } /* extern "C" */
41 | #endif
42 |
43 | #endif /*LV_DEMO_MUSIC_LIST_H*/
44 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/lv_demo_music_main.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_music_main.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_MUSIC_MAIN_H
7 | #define LV_DEMO_MUSIC_MAIN_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_demo_music.h"
17 | #if LV_USE_DEMO_MUSIC
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 | lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent);
31 | void _lv_demo_music_play(uint32_t id);
32 | void _lv_demo_music_resume(void);
33 | void _lv_demo_music_pause(void);
34 | void _lv_demo_music_album_next(bool next);
35 |
36 | /**********************
37 | * MACROS
38 | **********************/
39 | #endif /*LV_USE_DEMO_MUSIC*/
40 |
41 |
42 | #ifdef __cplusplus
43 | } /* extern "C" */
44 | #endif
45 |
46 | #endif /*LV_DEMO_MUSIC_MAIN_H*/
47 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_music/screenshot1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_music/screenshot1.gif
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_printer/README.md:
--------------------------------------------------------------------------------
1 | # Printer demo
2 |
3 | ## Overview
4 | A printer example created with LVGL. This demo is optmized for 800x480 resolution and among many others it demonstrates custom theme creation, style transitions and animations.
5 |
6 | The demo uses some images with 32 bit color depth they require ~1.6 MB flash. With 16 bit color depth ~900KB is required for the images.
7 |
8 | 
9 |
10 | ## Run the demo
11 | - In `lv_ex_conf.h` set `LV_USE_DEMO_PRINTER 1`
12 | - After `lv_init()` and initializing the drivers call `lv_demo_printer()`
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_printer/lv_demo_printer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_printer.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_PRINTER_H
7 | #define LV_DEMO_PRINTER_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../../lv_examples.h"
17 |
18 | /*********************
19 | * DEFINES
20 | *********************/
21 |
22 | /**********************
23 | * TYPEDEFS
24 | **********************/
25 |
26 | /**********************
27 | * GLOBAL PROTOTYPES
28 | **********************/
29 | void lv_demo_printer(void);
30 |
31 | /**********************
32 | * MACROS
33 | **********************/
34 |
35 | #ifdef __cplusplus
36 | } /* extern "C" */
37 | #endif
38 |
39 | #endif /*LV_DEMO_PRINTER_H*/
40 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_printer/screenshot1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_printer/screenshot1.gif
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_printer/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_printer/screenshot1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_stress/README.md:
--------------------------------------------------------------------------------
1 | # Stress demo
2 |
3 | ## Overview
4 |
5 | A stress test for LVGL.
6 | It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks.
7 |
8 | 
9 |
10 | ## Run the demo
11 | - In `lv_ex_conf.h` set `LV_USE_DEMO_STRESS 1`
12 | - In `lv_conf.h` enable all the widgets (`LV_USE_BTN 1`) and the animations (`LV_USE_ANIMATION 1`)
13 | - After `lv_init()` and initializing the drivers call `lv_demo_stress()`
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_stress/lv_demo_stress.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_stress.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_STRESS_H
7 | #define LV_DEMO_STRESS_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_demo_stress(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_DEMO_STRESS_H*/
39 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_stress/screenshot1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_stress/screenshot1.gif
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_stress/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_stress/screenshot1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_widgets/lv_demo_widgets.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_demo_widgets.h
3 | *
4 | */
5 |
6 | #ifndef LV_DEMO_WIDGETS_H
7 | #define LV_DEMO_WIDGETS_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_demo_widgets(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_DEMO_WIDGETS_H*/
39 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_widgets/screenshot1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_widgets/screenshot1.gif
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_demo_widgets/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_demo_widgets/screenshot1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_ex_get_started.h
3 | *
4 | */
5 |
6 | #ifndef LV_EX_GET_STARTED_H
7 | #define LV_EX_GET_STARTED_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_ex_get_started_1(void);
29 | void lv_ex_get_started_2(void);
30 | void lv_ex_get_started_3(void);
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 | #ifdef __cplusplus
37 | } /* extern "C" */
38 | #endif
39 |
40 | #endif /*LV_EX_GET_STARTED_H*/
41 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_1.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | static void btn_event_cb(lv_obj_t * btn, lv_event_t event)
4 | {
5 | if(event == LV_EVENT_CLICKED) {
6 | static uint8_t cnt = 0;
7 | cnt++;
8 |
9 | /*Get the first child of the button which is the label and change its text*/
10 | lv_obj_t * label = lv_obj_get_child(btn, NULL);
11 | lv_label_set_text_fmt(label, "Button: %d", cnt);
12 | }
13 | }
14 |
15 | /**
16 | * Create a button with a label and react on Click event.
17 | */
18 | void lv_ex_get_started_1(void)
19 | {
20 | lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button the current screen*/
21 | lv_obj_set_pos(btn, 10, 10); /*Set its position*/
22 | lv_obj_set_size(btn, 120, 50); /*Set its size*/
23 | lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
24 |
25 | lv_obj_t * label = lv_label_create(btn, NULL); /*Add a label to the button*/
26 | lv_label_set_text(label, "Button"); /*Set the labels text*/
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_1.py:
--------------------------------------------------------------------------------
1 | class counting_button(lv.btn):
2 | def __init__(self,parent):
3 | super().__init__(parent)
4 | self.set_pos(10, 10) # Set its position
5 | self.set_size(120, 50 ) # Set its size
6 | self.set_event_cb(self.btn_event_cb) # Assign a callback to the button
7 | self.label = lv.label(self, None) # Add a label to the button
8 | self.label.set_text("Button") # Set the labels text
9 | self.cnt=0
10 |
11 | def btn_event_cb(self,btn,event):
12 | if event == lv.EVENT.CLICKED:
13 | self.cnt += 1
14 | # Get the first child of the button which is the label and change its text
15 | label = btn.get_child(None)
16 | label.set_text("Button: %d"%self.cnt)
17 |
18 | #
19 | # Create a button with a label and react on Click event
20 | #
21 |
22 | btn = counting_button(lv.scr_act())
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_3.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_get_started/lv_ex_get_started_3.py:
--------------------------------------------------------------------------------
1 | def slider_event_cb(btn,event):
2 | global cnt
3 | if event == lv.EVENT.VALUE_CHANGED:
4 | # Refresh the text
5 | label.set_text(str(slider.get_value()))
6 |
7 | #
8 | # Create a slider and write its value on a label.
9 | #
10 |
11 | slider = lv.slider(lv.scr_act(), None)
12 | slider.set_width(200) # Set the width
13 | slider.align(None, lv.ALIGN.CENTER, 0, 0); # Align to the center of the parent (screen)
14 | slider.set_event_cb(slider_event_cb); # Assign an event function
15 |
16 | # Create a label below the slider
17 | label = lv.label(lv.scr_act(), None)
18 | label.set_text("0")
19 | label.set_auto_realign(True) # To keep center alignment when the width of the text changes
20 | label.align(slider, lv.ALIGN.OUT_BOTTOM_MID, 0, 20) # Align below the slider
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_ex_widgets.h
3 | *
4 | */
5 |
6 | #ifndef LV_EX_STYLE_H
7 | #define LV_EX_STYLE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_ex_style_1(void);
29 | void lv_ex_style_2(void);
30 | void lv_ex_style_3(void);
31 | void lv_ex_style_4(void);
32 | void lv_ex_style_5(void);
33 | void lv_ex_style_6(void);
34 | void lv_ex_style_7(void);
35 | void lv_ex_style_8(void);
36 | void lv_ex_style_9(void);
37 | void lv_ex_style_10(void);
38 | void lv_ex_style_11(void);
39 |
40 | /**********************
41 | * MACROS
42 | **********************/
43 |
44 | #ifdef __cplusplus
45 | } /* extern "C" */
46 | #endif
47 |
48 | #endif /*LV_EX_STYLE_H*/
49 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_1.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the background style properties
5 | */
6 | void lv_ex_style_1(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 5);
11 |
12 | /*Make a gradient*/
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 | lv_style_set_bg_grad_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
16 | lv_style_set_bg_grad_dir(&style, LV_STATE_DEFAULT, LV_GRAD_DIR_VER);
17 |
18 | /*Shift the gradient to the bottom*/
19 | lv_style_set_bg_main_stop(&style, LV_STATE_DEFAULT, 128);
20 | lv_style_set_bg_grad_stop(&style, LV_STATE_DEFAULT, 192);
21 |
22 |
23 | /*Create an object with the new style*/
24 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
25 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
26 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_1.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | #
3 | # Using the background style properties
4 | #
5 |
6 | style=lv.style_t()
7 | style.init()
8 |
9 | style.set_radius(lv.STATE.DEFAULT, 5)
10 |
11 | # Make a gradient
12 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
13 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
14 | style.set_bg_grad_color(lv.STATE.DEFAULT, lv_colors.BLUE)
15 | style.set_bg_grad_dir(lv.STATE.DEFAULT, lv.GRAD_DIR.VER)
16 |
17 | # Shift the gradient to the bottom
18 | style.set_bg_main_stop(lv.STATE.DEFAULT, 128)
19 | style.set_bg_grad_stop(lv.STATE.DEFAULT, 192)
20 |
21 |
22 | # Create an object with the new style
23 | obj = lv.obj(lv.scr_act(), None)
24 | obj.add_style(lv.obj.PART.MAIN, style)
25 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
26 |
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_10.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_10.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | # Set a background color and a radius
6 | style.set_radius(lv.STATE.DEFAULT, 5)
7 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
8 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
9 |
10 | # Set different background color in pressed state
11 | style.set_bg_color(lv.STATE.PRESSED, lv_colors.GRAY)
12 |
13 | # Set different transition time in default and pressed state
14 | # fast press, slower revert to default
15 | style.set_transition_time(lv.STATE.DEFAULT, 500)
16 | style.set_transition_time(lv.STATE.PRESSED, 200)
17 |
18 | # Small delay to make transition more visible
19 | style.set_transition_delay(lv.STATE.DEFAULT, 100)
20 |
21 | # Add `bg_color` to transitioned properties
22 | style.set_transition_prop_1(lv.STATE.DEFAULT, lv.STYLE.BG_COLOR)
23 |
24 | # Create an object with the new style
25 | obj = lv.obj(lv.scr_act(), None)
26 | obj.add_style(lv.obj.PART.MAIN, style);
27 | obj.align(None, lv.ALIGN.CENTER, 0, 0);
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_11.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_11.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | # Set a background color and a radius
6 | style.set_radius(lv.STATE.DEFAULT, 5)
7 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
8 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
9 |
10 | # Set some paddings
11 | style.set_pad_inner(lv.STATE.DEFAULT, 20)
12 | style.set_pad_top(lv.STATE.DEFAULT, 20)
13 | style.set_pad_left(lv.STATE.DEFAULT, 5)
14 | style.set_pad_right(lv.STATE.DEFAULT, 5)
15 |
16 | style.set_scale_end_color(lv.STATE.DEFAULT, lv_colors.RED)
17 | style.set_line_color(lv.STATE.DEFAULT, lv_colors.WHITE)
18 | style.set_scale_grad_color(lv.STATE.DEFAULT, lv_colors.BLUE)
19 | style.set_line_width(lv.STATE.DEFAULT, 2)
20 | style.set_scale_end_line_width(lv.STATE.DEFAULT, 4)
21 | style.set_scale_end_border_width(lv.STATE.DEFAULT, 4)
22 |
23 | # Gauge has a needle but for simplicity its style is not initialized here
24 |
25 | # Create an object with the new style*/
26 | obj = lv.gauge(lv.scr_act(), None)
27 | obj.add_style(lv.gauge.PART.MAIN, style)
28 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_2.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the border style properties
5 | */
6 | void lv_ex_style_2(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | /*Set a background color and a radius*/
12 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 20);
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 |
16 | /*Add border to the bottom+right*/
17 | lv_style_set_border_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
18 | lv_style_set_border_width(&style, LV_STATE_DEFAULT, 5);
19 | lv_style_set_border_opa(&style, LV_STATE_DEFAULT, LV_OPA_50);
20 | lv_style_set_border_side(&style, LV_STATE_DEFAULT, LV_BORDER_SIDE_BOTTOM | LV_BORDER_SIDE_RIGHT);
21 |
22 | /*Create an object with the new style*/
23 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
24 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
25 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_2.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | # Set a background color and a radius
6 | style.set_radius(lv.STATE.DEFAULT, 20)
7 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
8 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
9 |
10 | # Add border to the bottom+right
11 | style.set_border_color(lv.STATE.DEFAULT, lv_colors.BLUE)
12 | style.set_border_width(lv.STATE.DEFAULT, 5);
13 | style.set_border_opa(lv.STATE.DEFAULT, lv.OPA._50)
14 | style.set_border_side(lv.STATE.DEFAULT, lv.BORDER_SIDE.BOTTOM | lv.BORDER_SIDE.RIGHT);
15 |
16 | # Create an object with the new style
17 | obj = lv.obj(lv.scr_act(), None)
18 | obj.add_style(lv.obj.PART.MAIN, style);
19 | obj.align(None, lv.ALIGN.CENTER, 0, 0);
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_3.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the outline style properties
5 | */
6 | void lv_ex_style_3(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | /*Set a background color and a radius*/
12 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 5);
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 |
16 | /*Add outline*/
17 | lv_style_set_outline_width(&style, LV_STATE_DEFAULT, 2);
18 | lv_style_set_outline_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
19 | lv_style_set_outline_pad(&style, LV_STATE_DEFAULT, 8);
20 |
21 | /*Create an object with the new style*/
22 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
23 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
24 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_3.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_3.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | # Set a background color and a radius
6 | style.set_radius(lv.STATE.DEFAULT, 5)
7 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
8 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
9 |
10 | # Add outline
11 | style.set_outline_width(lv.STATE.DEFAULT, 2)
12 | style.set_outline_color(lv.STATE.DEFAULT, lv_colors.BLUE)
13 | style.set_outline_pad(lv.STATE.DEFAULT, 8)
14 |
15 | # Create an object with the new style
16 | obj = lv.obj(lv.scr_act(), None)
17 | obj.add_style(lv.obj.PART.MAIN, style)
18 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
19 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_4.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the Shadow style properties
5 | */
6 | void lv_ex_style_4(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | /*Set a background color and a radius*/
12 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 5);
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 |
16 | /*Add a shadow*/
17 | lv_style_set_shadow_width(&style, LV_STATE_DEFAULT, 8);
18 | lv_style_set_shadow_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
19 | lv_style_set_shadow_ofs_x(&style, LV_STATE_DEFAULT, 10);
20 | lv_style_set_shadow_ofs_y(&style, LV_STATE_DEFAULT, 20);
21 |
22 | /*Create an object with the new style*/
23 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
24 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
25 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_4.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_4.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 | # Set a background color and a radius
5 | style.set_radius(lv.STATE.DEFAULT, 5)
6 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
7 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
8 |
9 | # Add a shadow
10 | style.set_shadow_width(lv.STATE.DEFAULT, 8)
11 | style.set_shadow_color(lv.STATE.DEFAULT, lv_colors.BLUE)
12 | style.set_shadow_ofs_x(lv.STATE.DEFAULT, 10)
13 | style.set_shadow_ofs_y(lv.STATE.DEFAULT, 20)
14 |
15 | # Create an object with the new style
16 | obj = lv.obj(lv.scr_act(), None)
17 | obj.add_style(lv.obj.PART.MAIN, style)
18 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
19 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_5.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the pattern style properties
5 | */
6 | void lv_ex_style_5(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | /*Set a background color and a radius*/
12 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 5);
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 |
16 | /*Add a repeating pattern*/
17 | lv_style_set_pattern_image(&style, LV_STATE_DEFAULT, LV_SYMBOL_OK);
18 | lv_style_set_pattern_recolor(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
19 | lv_style_set_pattern_opa(&style, LV_STATE_DEFAULT, LV_OPA_50);
20 | lv_style_set_pattern_repeat(&style, LV_STATE_DEFAULT, true);
21 |
22 | /*Create an object with the new style*/
23 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
24 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
25 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_5.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_5.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | # Set a background color and a radius
6 | style.set_radius(lv.STATE.DEFAULT, 5)
7 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
8 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
9 |
10 | # Add a repeating pattern
11 | style.set_pattern_image(lv.STATE.DEFAULT, lv.SYMBOL.OK)
12 | style.set_pattern_recolor(lv.STATE.DEFAULT, lv_colors.BLUE)
13 | style.set_pattern_opa(lv.STATE.DEFAULT, lv.OPA._50);
14 | style.set_pattern_repeat(lv.STATE.DEFAULT, True)
15 |
16 | # Create an object with the new style
17 | obj = lv.obj(lv.scr_act(), None)
18 | obj.add_style(lv.obj.PART.MAIN, style)
19 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
20 |
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_6.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the value style properties
5 | */
6 | void lv_ex_style_6(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | /*Set a background color and a radius*/
12 | lv_style_set_radius(&style, LV_STATE_DEFAULT, 5);
13 | lv_style_set_bg_opa(&style, LV_STATE_DEFAULT, LV_OPA_COVER);
14 | lv_style_set_bg_color(&style, LV_STATE_DEFAULT, LV_COLOR_SILVER);
15 |
16 | /*Add a value text properties*/
17 | lv_style_set_value_color(&style, LV_STATE_DEFAULT, LV_COLOR_BLUE);
18 | lv_style_set_value_align(&style, LV_STATE_DEFAULT, LV_ALIGN_IN_BOTTOM_RIGHT);
19 | lv_style_set_value_ofs_x(&style, LV_STATE_DEFAULT, 10);
20 | lv_style_set_value_ofs_y(&style, LV_STATE_DEFAULT, 10);
21 |
22 | /*Create an object with the new style*/
23 | lv_obj_t * obj = lv_obj_create(lv_scr_act(), NULL);
24 | lv_obj_add_style(obj, LV_OBJ_PART_MAIN, &style);
25 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
26 |
27 | /*Add a value text to the local style. This way every object can have different text*/
28 | lv_obj_set_style_local_value_str(obj, LV_OBJ_PART_MAIN, LV_STATE_DEFAULT, "Text");
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_6.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_6.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 | # Set a background color and a radius
5 | style.set_radius(lv.STATE.DEFAULT, 5)
6 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
7 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
8 |
9 | # Add a value text properties
10 | style.set_value_color(lv.STATE.DEFAULT, lv_colors.BLUE)
11 | style.set_value_align(lv.STATE.DEFAULT, lv.ALIGN.IN_BOTTOM_RIGHT)
12 | style.set_value_ofs_x(lv.STATE.DEFAULT, 10)
13 | style.set_value_ofs_y(lv.STATE.DEFAULT, 10)
14 |
15 | # Create an object with the new style
16 | obj = lv.obj(lv.scr_act(), None)
17 | obj.add_style(lv.obj.PART.MAIN, style)
18 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
19 |
20 | # Add a value text to the local style. This way every object can have different text
21 | obj.set_style_local_value_str(lv.obj.PART.MAIN, lv.STATE.DEFAULT, "Text")
22 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_7.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_7.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 | # Set a background color and a radius
5 | style.set_radius(lv.STATE.DEFAULT, 5)
6 | style.set_bg_opa(lv.STATE.DEFAULT, lv.OPA.COVER)
7 | style.set_bg_color(lv.STATE.DEFAULT, lv_colors.SILVER)
8 | style.set_border_width(lv.STATE.DEFAULT, 2)
9 | style.set_border_color(lv.STATE.DEFAULT, lv_colors.BLUE)
10 |
11 | style.set_pad_top(lv.STATE.DEFAULT, 10)
12 | style.set_pad_bottom(lv.STATE.DEFAULT, 10)
13 | style.set_pad_left(lv.STATE.DEFAULT, 10)
14 | style.set_pad_right(lv.STATE.DEFAULT, 10)
15 |
16 | style.set_text_color(lv.STATE.DEFAULT, lv_colors.BLUE)
17 | style.set_text_letter_space(lv.STATE.DEFAULT, 5)
18 | style.set_text_line_space(lv.STATE.DEFAULT, 20)
19 | style.set_text_decor(lv.STATE.DEFAULT, lv.TEXT_DECOR.UNDERLINE)
20 |
21 | # Create an object with the new style
22 | obj = lv.label(lv.scr_act(), None)
23 | obj.add_style(lv.label.PART.MAIN, style)
24 | obj.set_text("Text of\n"
25 | "a label")
26 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_8.c:
--------------------------------------------------------------------------------
1 | #include "../../lv_examples.h"
2 |
3 | /**
4 | * Using the line style properties
5 | */
6 | void lv_ex_style_8(void)
7 | {
8 | static lv_style_t style;
9 | lv_style_init(&style);
10 |
11 | lv_style_set_line_color(&style, LV_STATE_DEFAULT, LV_COLOR_GRAY);
12 | lv_style_set_line_width(&style, LV_STATE_DEFAULT, 6);
13 | lv_style_set_line_rounded(&style, LV_STATE_DEFAULT, true);
14 | #if LV_USE_LINE
15 | /*Create an object with the new style*/
16 | lv_obj_t * obj = lv_line_create(lv_scr_act(), NULL);
17 | lv_obj_add_style(obj, LV_LINE_PART_MAIN, &style);
18 |
19 | static lv_point_t p[] = {{10, 30}, {30, 50}, {100, 0}};
20 | lv_line_set_points(obj, p, 3);
21 |
22 | lv_obj_align(obj, NULL, LV_ALIGN_CENTER, 0, 0);
23 | #endif
24 | }
25 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_8.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_8.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | style = lv.style_t()
3 | style.init()
4 |
5 | style.set_line_color(lv.STATE.DEFAULT,lv_colors.GRAY)
6 | style.set_line_width(lv.STATE.DEFAULT, 6)
7 | style.set_line_rounded(lv.STATE.DEFAULT, True)
8 |
9 | # Create an object with the new style
10 | obj = lv.line(lv.scr_act(), None)
11 | obj.add_style(lv.line.PART.MAIN, style)
12 |
13 | p = [ {"x":10, "y":30},
14 | {"x":30, "y":50},
15 | {"x":100, "y":0}]
16 |
17 | obj.set_points(p, 3)
18 |
19 | obj.align(None, lv.ALIGN.CENTER, 0, 0)
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_style/lv_ex_style_9.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Arc
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_arc/lv_ex_arc_1
8 | :language: c
9 |
10 | Loader with Arc
11 | """"""""""""""""
12 |
13 | .. lv_example:: lv_ex_widgets/lv_ex_arc/lv_ex_arc_2
14 | :language: c
15 |
16 | MicroPython
17 | ^^^^^^^^^^^
18 |
19 | No examples yet.
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 |
3 | #if LV_USE_ARC
4 |
5 | void lv_ex_arc_1(void)
6 | {
7 | /*Create an Arc*/
8 | lv_obj_t * arc = lv_arc_create(lv_scr_act(), NULL);
9 | lv_arc_set_end_angle(arc, 200);
10 | lv_obj_set_size(arc, 150, 150);
11 | lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0);
12 | }
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_1.py:
--------------------------------------------------------------------------------
1 | # create an arc
2 | arc = lv.arc(lv.scr_act(),None)
3 | arc.set_end_angle(200)
4 | arc.set_size(150,150)
5 | arc.align(None,lv.ALIGN.CENTER,0,0)
6 |
7 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_2.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_ARC
3 |
4 | /**
5 | * An `lv_task` to call periodically to set the angles of the arc
6 | * @param t
7 | */
8 | static void arc_loader(lv_task_t * t)
9 | {
10 | static int16_t a = 270;
11 |
12 | a+=5;
13 |
14 | lv_arc_set_end_angle(t->user_data, a);
15 |
16 | if(a >= 270 + 360) {
17 | lv_task_del(t);
18 | return;
19 | }
20 | }
21 |
22 | /**
23 | * Create an arc which acts as a loader.
24 | */
25 | void lv_ex_arc_2(void)
26 | {
27 | /*Create an Arc*/
28 | lv_obj_t * arc = lv_arc_create(lv_scr_act(), NULL);
29 | lv_arc_set_bg_angles(arc, 0, 360);
30 | lv_arc_set_angles(arc, 270, 270);
31 | lv_obj_align(arc, NULL, LV_ALIGN_CENTER, 0, 0);
32 |
33 | /* Create an `lv_task` to update the arc.
34 | * Store the `arc` in the user data*/
35 | lv_task_create(arc_loader, 20, LV_TASK_PRIO_LOWEST, arc);
36 | }
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_arc/lv_ex_arc_2.py:
--------------------------------------------------------------------------------
1 | def arc_loader(task,arc):
2 | angle = arc.get_value()
3 | # print("angle: ",angle)
4 | angle += 5
5 | if angle > 360:
6 | task._del()
7 | else:
8 | arc.set_value(angle)
9 |
10 | # create an arc which acts as a loader
11 |
12 | arc = lv.arc(lv.scr_act(),None)
13 | arc.set_range(0,360)
14 | arc.set_bg_angles(0,360)
15 | arc.set_angles(0,360)
16 | arc.set_rotation(270)
17 | arc.align(None,lv.ALIGN.CENTER,0,0)
18 | arc.set_value(10)
19 |
20 | # Create an `lv_task` to update the arc.
21 |
22 | task = lv.task_create_basic()
23 | task.set_cb(lambda task: arc_loader(task, arc))
24 | task.set_period(20)
25 | task.set_prio(lv.TASK_PRIO.LOWEST)
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_bar/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 | Simple Bar
4 | """"""""""""""""
5 |
6 | .. lv_example:: lv_ex_widgets/lv_ex_bar/lv_ex_bar_1
7 | :language: c
8 |
9 | MicroPython
10 | ^^^^^^^^^^^
11 |
12 | No examples yet.
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_bar/lv_ex_bar_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_BAR
3 |
4 | void lv_ex_bar_1(void)
5 | {
6 | lv_obj_t * bar1 = lv_bar_create(lv_scr_act(), NULL);
7 | lv_obj_set_size(bar1, 200, 20);
8 | lv_obj_align(bar1, NULL, LV_ALIGN_CENTER, 0, 0);
9 | lv_bar_set_anim_time(bar1, 2000);
10 | lv_bar_set_value(bar1, 100, LV_ANIM_ON);
11 | }
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_bar/lv_ex_bar_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_bar/lv_ex_bar_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_bar/lv_ex_bar_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | if source.is_checked():
4 | print("State: checked")
5 | else:
6 | print("State: unchecked")
7 |
8 | # create a simple bar
9 | bar1 = lv.bar(lv.scr_act(),None)
10 | bar1.set_size(200,20)
11 | bar1.align(None,lv.ALIGN.CENTER,0,0)
12 | bar1.set_anim_time(2000)
13 | bar1.set_value(100,lv.ANIM.ON)
14 |
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Buttons
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_btn/lv_ex_btn_1
8 | :language: c
9 |
10 | .. lv_example:: lv_ex_widgets/lv_ex_btn/lv_ex_btn_2
11 | :language: c
12 |
13 | MicroPython
14 | ^^^^^^^^^^^
15 |
16 | No examples yet.
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_BTN
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_CLICKED) {
8 | printf("Clicked\n");
9 | }
10 | else if(event == LV_EVENT_VALUE_CHANGED) {
11 | printf("Toggled\n");
12 | }
13 | }
14 |
15 | void lv_ex_btn_1(void)
16 | {
17 | lv_obj_t * label;
18 |
19 | lv_obj_t * btn1 = lv_btn_create(lv_scr_act(), NULL);
20 | lv_obj_set_event_cb(btn1, event_handler);
21 | lv_obj_align(btn1, NULL, LV_ALIGN_CENTER, 0, -40);
22 |
23 | label = lv_label_create(btn1, NULL);
24 | lv_label_set_text(label, "Button");
25 |
26 | lv_obj_t * btn2 = lv_btn_create(lv_scr_act(), NULL);
27 | lv_obj_set_event_cb(btn2, event_handler);
28 | lv_obj_align(btn2, NULL, LV_ALIGN_CENTER, 0, 40);
29 | lv_btn_set_checkable(btn2, true);
30 | lv_btn_toggle(btn2);
31 | lv_btn_set_fit2(btn2, LV_FIT_NONE, LV_FIT_TIGHT);
32 |
33 | label = lv_label_create(btn2, NULL);
34 | lv_label_set_text(label, "Toggled");
35 | }
36 | #endif
37 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.CLICKED:
3 | if source == btn1:
4 | # treat "clicked" events only for btn1
5 | print("Clicked")
6 | elif evt == lv.EVENT.VALUE_CHANGED:
7 | print("Toggled")
8 |
9 |
10 | # create a simple button
11 | btn1 = lv.btn(lv.scr_act(),None)
12 | # attach the callback
13 | btn1.set_event_cb(event_handler)
14 | btn1.align(None,lv.ALIGN.CENTER,0,-40)
15 | label=lv.label(btn1,None)
16 | label.set_text("Button")
17 |
18 | # create a toggle button
19 | btn2 = lv.btn(lv.scr_act(),None)
20 | # attach the callback
21 | btn2.set_event_cb(event_handler)
22 | btn2.align(None,lv.ALIGN.CENTER,0,40)
23 | btn2.set_checkable(True)
24 | btn2.toggle()
25 | #btn2.set_fit2(lv.FIT.NONE,lv.FIT.TIGHT)
26 | label=lv.label(btn2,None)
27 | label.set_text("Toggled")
28 |
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btn/lv_ex_btn_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btnmatrix/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Button matrix
5 | """"""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_btnmatrix/lv_ex_btnmatrix_1
8 | :language: c
9 |
10 |
11 | MicroPython
12 | ^^^^^^^^^^^
13 |
14 | No examples yet.
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btnmatrix/lv_ex_btnmatrix_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_BTNMATRIX
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | const char * txt = lv_btnmatrix_get_active_btn_text(obj);
9 |
10 | printf("%s was pressed\n", txt);
11 | }
12 | }
13 |
14 |
15 | static const char * btnm_map[] = {"1", "2", "3", "4", "5", "\n",
16 | "6", "7", "8", "9", "0", "\n",
17 | "Action1", "Action2", ""};
18 |
19 | void lv_ex_btnmatrix_1(void)
20 | {
21 | lv_obj_t * btnm1 = lv_btnmatrix_create(lv_scr_act(), NULL);
22 | lv_btnmatrix_set_map(btnm1, btnm_map);
23 | lv_btnmatrix_set_btn_width(btnm1, 10, 2); /*Make "Action1" twice as wide as "Action2"*/
24 | lv_btnmatrix_set_btn_ctrl(btnm1, 10, LV_BTNMATRIX_CTRL_CHECKABLE);
25 | lv_btnmatrix_set_btn_ctrl(btnm1, 11, LV_BTNMATRIX_CTRL_CHECK_STATE);
26 | lv_obj_align(btnm1, NULL, LV_ALIGN_CENTER, 0, 0);
27 | lv_obj_set_event_cb(btnm1, event_handler);
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btnmatrix/lv_ex_btnmatrix_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btnmatrix/lv_ex_btnmatrix_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_btnmatrix/lv_ex_btnmatrix_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | print("Toggled")
4 | txt = source.get_active_btn_text()
5 | print("%s was pressed"%txt)
6 |
7 | # Create a screen and load it
8 | scr = lv.obj()
9 | lv.scr_load(scr)
10 |
11 | btnm_map = ["1","2", "3", "4", "5", "\n",
12 | "6", "7", "8", "9", "0", "\n",
13 | "Action1", "Action2", ""]
14 |
15 | btnm_ctlr_map = [46|lv.btnmatrix.CTRL.NO_REPEAT,46,46,46,46,
16 | 46,46,46,46,46,
17 | 115,115]
18 |
19 | # create a button matrix
20 | btnm1 = lv.btnmatrix(lv.scr_act(),None)
21 | btnm1.set_map(btnm_map)
22 | #btnm1.set_ctrl_map(btnm_ctlr_map)
23 | btnm1.set_btn_ctrl(10,lv.btnmatrix.CTRL.CHECKABLE)
24 | btnm1.set_btn_ctrl(11,lv.btnmatrix.CTRL.CHECK_STATE)
25 | btnm1.set_width(230)
26 | btnm1.align(None,lv.ALIGN.CENTER,0,0)
27 | # attach the callback
28 | btnm1.set_event_cb(event_handler)
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_calendar/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Calendar with day select
5 | """""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_calendar/lv_ex_calendar_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_calendar/lv_ex_calendar_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_calendar/lv_ex_calendar_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Drawing on the Canvas and rotate
5 | """"""""""""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_1
8 | :language: c
9 |
10 | Transparent Canvas with chroma keying
11 | """"""""""""""""""""""""""""""""""""""
12 |
13 | .. lv_example:: lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_2
14 | :language: c
15 |
16 | MicroPython
17 | ^^^^^^^^^^^
18 |
19 | No examples yet.
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_canvas/lv_ex_canvas_2.py:
--------------------------------------------------------------------------------
1 | def LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h):
2 | return int(((w / 8) + 1) * h)
3 |
4 | def LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h):
5 | return LV_IMG_BUF_SIZE_ALPHA_1BIT(w, h) + 4 * 2
6 |
7 | def LV_CANVAS_BUF_SIZE_INDEXED_1BIT(w, h):
8 | return LV_IMG_BUF_SIZE_INDEXED_1BIT(w, h)
9 |
10 | CANVAS_WIDTH = 50
11 | CANVAS_HEIGHT = 50
12 |
13 | # Create a button to better see the transparency
14 | btn=lv.btn(lv.scr_act(), None)
15 |
16 | # Create a buffer for the canvas
17 | cbuf= bytearray(LV_CANVAS_BUF_SIZE_INDEXED_1BIT(CANVAS_WIDTH, CANVAS_HEIGHT))
18 |
19 | # Create a canvas and initialize its the palette
20 | canvas = lv.canvas(lv.scr_act(), None)
21 | canvas.set_buffer(cbuf, CANVAS_WIDTH, CANVAS_HEIGHT, lv.img.CF.INDEXED_1BIT)
22 | canvas.set_palette(0, LV_COLOR_LIME)
23 | canvas.set_palette(1, LV_COLOR_RED)
24 |
25 | # Create colors with the indices of the palette
26 | c0 = lv.color_t()
27 | c1 = lv.color_t()
28 |
29 | c0.full = 0
30 | c1.full = 1
31 |
32 | # Transparent background
33 | canvas.fill_bg(c1, lv.OPA.TRANSP)
34 |
35 | # Create hole on the canvas
36 | for y in range(10,30):
37 | for x in range(5,20):
38 | canvas.set_px(x, y, c0)
39 |
40 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Line Chart
5 | """"""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_chart/lv_ex_chart_1
8 | :language: c
9 |
10 | .. lv_example:: lv_ex_widgets/lv_ex_chart/lv_ex_chart_2
11 | :language: c
12 |
13 |
14 | MicroPython
15 | ^^^^^^^^^^^
16 |
17 | No examples yet.
18 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_1.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 |
3 | # create a chart
4 | chart = lv.chart(lv.scr_act(),None)
5 | chart.set_size(200,150)
6 | chart.align(None,lv.ALIGN.CENTER,0,0)
7 | chart.set_type(lv.chart.TYPE.LINE)
8 |
9 | ser1=chart.add_series(lv_colors.RED)
10 | ser2=chart.add_series(lv_colors.GREEN)
11 |
12 | # Set next points on ser1
13 | chart.set_next(ser1,10)
14 | chart.set_next(ser1,10)
15 | chart.set_next(ser1,10)
16 | chart.set_next(ser1,10)
17 | chart.set_next(ser1,10)
18 | chart.set_next(ser1,10)
19 | chart.set_next(ser1,10)
20 | chart.set_next(ser1,30)
21 | chart.set_next(ser1,70)
22 | chart.set_next(ser1,90)
23 |
24 | # Set points on ser2
25 | chart.set_points(ser2, [90, 70, 65, 65, 65, 65, 65, 65, 65, 65])
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_chart/lv_ex_chart_2.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 |
3 | # create a chart
4 | chart = lv.chart(lv.scr_act(),None)
5 | chart.set_size(200,150)
6 | chart.align(None,lv.ALIGN.CENTER,0,0)
7 | chart.set_type(lv.chart.TYPE.LINE)
8 | # Add a faded are effect
9 | chart.set_style_local_bg_opa(lv.chart.PART.SERIES, lv.STATE.DEFAULT, lv.OPA._50) # Max. opa.
10 | chart.set_style_local_bg_grad_dir(lv.chart.PART.SERIES, lv.STATE.DEFAULT, lv.GRAD_DIR.VER)
11 | chart.set_style_local_bg_main_stop(lv.chart.PART.SERIES, lv.STATE.DEFAULT, 255) # Max opa on the top
12 | chart.set_style_local_bg_grad_stop(lv.chart.PART.SERIES, lv.STATE.DEFAULT, 0) # Transparent on the bottom
13 |
14 | ser1=chart.add_series(lv_colors.RED)
15 | ser2=chart.add_series(lv_colors.GREEN)
16 |
17 | # Set next points on ser1
18 | chart.set_next(ser1,31)
19 | chart.set_next(ser1,66)
20 | chart.set_next(ser1,10)
21 | chart.set_next(ser1,89)
22 | chart.set_next(ser1,63)
23 | chart.set_next(ser1,56)
24 | chart.set_next(ser1,32)
25 | chart.set_next(ser1,35)
26 | chart.set_next(ser1,57)
27 | chart.set_next(ser1,85)
28 |
29 | # Set points on ser2
30 | chart.set_points(ser2, [92, 71, 61, 15, 21, 35, 35, 58, 31, 53])
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_checkbox/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Checkbox
5 | """"""""""""""""
6 | .. lv_example:: lv_ex_widgets/lv_ex_checkbox/lv_ex_checkbox_1
7 | :language: c
8 |
9 | MicroPython
10 | ^^^^^^^^^^^
11 |
12 | No examples yet.
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_checkbox/lv_ex_checkbox_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_CHECKBOX
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | printf("State: %s\n", lv_checkbox_is_checked(obj) ? "Checked" : "Unchecked");
9 | }
10 | }
11 |
12 | void lv_ex_checkbox_1(void)
13 | {
14 | lv_obj_t * cb = lv_checkbox_create(lv_scr_act(), NULL);
15 | lv_checkbox_set_text(cb, "I agree to terms and conditions.");
16 | lv_obj_align(cb, NULL, LV_ALIGN_CENTER, 0, 0);
17 | lv_obj_set_event_cb(cb, event_handler);
18 | }
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_checkbox/lv_ex_checkbox_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_checkbox/lv_ex_checkbox_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_checkbox/lv_ex_checkbox_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | if source.is_checked():
4 | print("State: checked")
5 | else:
6 | print("State: unchecked")
7 |
8 | # create a checkbox
9 | cb = lv.checkbox(lv.scr_act(),None)
10 | cb.set_text("I agree to terms\nand conditions.")
11 | cb.align(None,lv.ALIGN.CENTER, 0, 0)
12 | # attach the callback
13 | cb.set_event_cb(event_handler)
14 |
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cont/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Container with auto-fit
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_cont/lv_ex_cont_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cont/lv_ex_cont_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_CONT
3 |
4 | void lv_ex_cont_1(void)
5 | {
6 | lv_obj_t * cont;
7 |
8 | cont = lv_cont_create(lv_scr_act(), NULL);
9 | lv_obj_set_auto_realign(cont, true); /*Auto realign when the size changes*/
10 | lv_obj_align_origo(cont, NULL, LV_ALIGN_CENTER, 0, 0); /*This parametrs will be sued when realigned*/
11 | lv_cont_set_fit(cont, LV_FIT_TIGHT);
12 | lv_cont_set_layout(cont, LV_LAYOUT_COLUMN_MID);
13 |
14 | lv_obj_t * label;
15 | label = lv_label_create(cont, NULL);
16 | lv_label_set_text(label, "Short text");
17 |
18 | /*Refresh and pause here for a while to see how `fit` works*/
19 | uint32_t t;
20 | lv_refr_now(NULL);
21 | t = lv_tick_get();
22 | while(lv_tick_elaps(t) < 500);
23 |
24 | label = lv_label_create(cont, NULL);
25 | lv_label_set_text(label, "It is a long text");
26 |
27 | /*Wait here too*/
28 | lv_refr_now(NULL);
29 | t = lv_tick_get();
30 | while(lv_tick_elaps(t) < 500);
31 |
32 | label = lv_label_create(cont, NULL);
33 | lv_label_set_text(label, "Here is an even longer text");
34 | }
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cont/lv_ex_cont_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cont/lv_ex_cont_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cont/lv_ex_cont_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | if source.is_checked():
4 | print("State: checked")
5 | else:
6 | print("State: unchecked")
7 |
8 | # create a container
9 | cont = lv.cont(lv.scr_act(),None)
10 | cont.set_auto_realign(True) # Auto realign when the size changes
11 | cont.align_mid(None,lv.ALIGN.CENTER,0,0) # This parameters will be sued when realigned
12 | cont.set_fit(lv.FIT.TIGHT)
13 | cont.set_layout(lv.LAYOUT.COLUMN_MID);
14 | label = lv.label(cont)
15 | label.set_text("Short text")
16 |
17 | # Refresh and pause here for a while to see how `fit` works
18 | time.sleep(1)
19 |
20 | label = lv.label(cont)
21 | label.set_text("It is a long text")
22 |
23 | # Wait here too
24 | time.sleep(1)
25 |
26 | label = lv.label(cont)
27 | label.set_text("Here an even longer text")
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Disc color picker
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_CPICKER
3 |
4 | void lv_ex_cpicker_1(void)
5 | {
6 | lv_obj_t * cpicker;
7 |
8 | cpicker = lv_cpicker_create(lv_scr_act(), NULL);
9 | lv_obj_set_size(cpicker, 200, 200);
10 | lv_obj_align(cpicker, NULL, LV_ALIGN_CENTER, 0, 0);
11 | }
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_1.py:
--------------------------------------------------------------------------------
1 | cpicker = lv.cpicker(lv.scr_act(),None)
2 | cpicker.set_size(200, 200)
3 | cpicker.align(None, lv.ALIGN.CENTER, 0, 0)
4 |
5 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_2.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_CPICKER
3 |
4 | void lv_ex_cpicker_2(void)
5 | {
6 | lv_obj_t * cpicker;
7 |
8 | cpicker = lv_cpicker_create(lv_scr_act(), NULL);
9 | lv_cpicker_set_type(cpicker, LV_CPICKER_TYPE_RECT);
10 | lv_obj_set_size(cpicker, 200, 50);
11 | lv_obj_align(cpicker, NULL, LV_ALIGN_CENTER, 0, 0);
12 | }
13 |
14 | #endif
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_cpicker/lv_ex_cpicker_2.py:
--------------------------------------------------------------------------------
1 | #!/opt/bin/lv_micropython
2 | import lvgl as lv
3 | import init_gui
4 | import time
5 |
6 | cpicker = lv.cpicker(lv.scr_act(),None)
7 | cpicker.set_type(lv.cpicker.TYPE.RECT);
8 | cpicker.set_size(200, 50);
9 | cpicker.align(None, lv.ALIGN.CENTER, 0, 0)
10 |
11 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Drop down list
5 | """"""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_1
8 | :language: c
9 |
10 | Drop "up" list
11 | """"""""""""""""""""""
12 |
13 | .. lv_example:: lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_2
14 | :language: c
15 |
16 | MicroPython
17 | ^^^^^^^^^^^
18 |
19 | No examples yet.
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_DROPDOWN
4 |
5 |
6 | static void event_handler(lv_obj_t * obj, lv_event_t event)
7 | {
8 | if(event == LV_EVENT_VALUE_CHANGED) {
9 | char buf[32];
10 | lv_dropdown_get_selected_str(obj, buf, sizeof(buf));
11 | printf("Option: %s\n", buf);
12 | }
13 | }
14 |
15 | void lv_ex_dropdown_1(void)
16 | {
17 |
18 | /*Create a normal drop down list*/
19 | lv_obj_t * ddlist = lv_dropdown_create(lv_scr_act(), NULL);
20 | lv_dropdown_set_options(ddlist, "Apple\n"
21 | "Banana\n"
22 | "Orange\n"
23 | "Melon\n"
24 | "Grape\n"
25 | "Raspberry");
26 |
27 | lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_MID, 0, 20);
28 | lv_obj_set_event_cb(ddlist, event_handler);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(obj, event):
2 | if event == lv.EVENT.VALUE_CHANGED:
3 | option = " "*10 # should be large enough to store the option
4 | obj.get_selected_str(option, len(option))
5 | # .strip() removes trailing spaces
6 | print("Option: \"%s\"" % option.strip())
7 |
8 | # Create a drop down list
9 | ddlist = lv.dropdown(lv.scr_act())
10 | ddlist.set_options("\n".join([
11 | "Apple",
12 | "Banana",
13 | "Orange",
14 | "Melon",
15 | "Grape",
16 | "Raspberry"]))
17 |
18 | # ddlist.set_fix_width(150)
19 | # ddlist.set_draw_arrow(True)
20 | ddlist.align(None, lv.ALIGN.IN_TOP_MID, 0, 20)
21 | ddlist.set_event_cb(event_handler)
22 |
23 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_2.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_DROPDOWN
4 |
5 |
6 | /**
7 | * Create a drop LEFT menu
8 | */
9 | void lv_ex_dropdown_2(void)
10 | {
11 | /*Create a drop down list*/
12 | lv_obj_t * ddlist = lv_dropdown_create(lv_scr_act(), NULL);
13 | lv_dropdown_set_options(ddlist, "Apple\n"
14 | "Banana\n"
15 | "Orange\n"
16 | "Melon\n"
17 | "Grape\n"
18 | "Raspberry");
19 |
20 | lv_dropdown_set_dir(ddlist, LV_DROPDOWN_DIR_LEFT);
21 | lv_dropdown_set_symbol(ddlist, NULL);
22 | lv_dropdown_set_show_selected(ddlist, false);
23 | lv_dropdown_set_text(ddlist, "Fruits");
24 | /*It will be called automatically when the size changes*/
25 | lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 20);
26 |
27 | /*Copy the drop LEFT list*/
28 | ddlist = lv_dropdown_create(lv_scr_act(), ddlist);
29 | lv_obj_align(ddlist, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 100);
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_dropdown/lv_ex_dropdown_2.py:
--------------------------------------------------------------------------------
1 | # Create a drop down list
2 | ddlist = lv.dropdown(lv.scr_act())
3 | ddlist.set_options("\n".join([
4 | "Apple",
5 | "Banana",
6 | "Orange",
7 | "Melon",
8 | "Grape",
9 | "Raspberry"]))
10 |
11 | ddlist.set_dir(lv.dropdown.DIR.LEFT);
12 | ddlist.set_symbol(None)
13 | ddlist.set_show_selected(False)
14 | ddlist.set_text("Fruits")
15 | # It will be called automatically when the size changes
16 | ddlist.align(None, lv.ALIGN.IN_TOP_RIGHT, 0, 20)
17 |
18 | # Copy the drop LEFT list
19 | ddlist = lv.dropdown(lv.scr_act(), ddlist)
20 | ddlist.align(None, lv.ALIGN.IN_TOP_RIGHT, 0, 100)
21 |
22 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Gauge
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_1
8 | :language: c
9 |
10 | .. lv_example:: lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2
11 | :language: c
12 |
13 | MicroPython
14 | ^^^^^^^^^^^
15 |
16 | No examples yet.
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_GAUGE
3 |
4 |
5 | void lv_ex_gauge_1(void)
6 | {
7 | /*Describe the color for the needles*/
8 | static lv_color_t needle_colors[3];
9 | needle_colors[0] = LV_COLOR_BLUE;
10 | needle_colors[1] = LV_COLOR_ORANGE;
11 | needle_colors[2] = LV_COLOR_PURPLE;
12 |
13 | /*Create a gauge*/
14 | lv_obj_t * gauge1 = lv_gauge_create(lv_scr_act(), NULL);
15 | lv_gauge_set_needle_count(gauge1, 3, needle_colors);
16 | lv_obj_set_size(gauge1, 200, 200);
17 | lv_obj_align(gauge1, NULL, LV_ALIGN_CENTER, 0, 0);
18 |
19 | /*Set the values*/
20 | lv_gauge_set_value(gauge1, 0, 10);
21 | lv_gauge_set_value(gauge1, 1, 20);
22 | lv_gauge_set_value(gauge1, 2, 30);
23 | }
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_1.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 |
3 | # needle colors
4 | needle_colors=[lv_colors.BLUE,lv_colors.ORANGE,lv_colors.PURPLE]
5 |
6 | # create the gauge
7 | gauge1=lv.gauge(lv.scr_act(),None)
8 | gauge1.set_needle_count(3, needle_colors)
9 | gauge1.set_size(200,200)
10 | gauge1.align(None,lv.ALIGN.CENTER,0,0)
11 |
12 | # Set the values
13 | gauge1.set_value(0, 10)
14 | gauge1.set_value(1, 20)
15 | gauge1.set_value(2, 50)
16 |
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_GAUGE
3 |
4 |
5 | void lv_ex_gauge_2(void)
6 | {
7 | /*Describe the color for the needles*/
8 | static lv_color_t needle_colors[3];
9 | needle_colors[0] = LV_COLOR_BLUE;
10 | needle_colors[1] = LV_COLOR_ORANGE;
11 | needle_colors[2] = LV_COLOR_PURPLE;
12 |
13 | LV_IMG_DECLARE(img_hand);
14 |
15 | /*Create a gauge*/
16 | lv_obj_t * gauge1 = lv_gauge_create(lv_scr_act(), NULL);
17 | lv_gauge_set_needle_count(gauge1, 3, needle_colors);
18 | lv_obj_set_size(gauge1, 200, 200);
19 | lv_obj_align(gauge1, NULL, LV_ALIGN_CENTER, 0, 0);
20 | lv_gauge_set_needle_img(gauge1, &img_hand, 4, 4);
21 | /*Allow recoloring of the images according to the needles' color*/
22 | lv_obj_set_style_local_image_recolor_opa(gauge1, LV_GAUGE_PART_NEEDLE, LV_STATE_DEFAULT, LV_OPA_COVER);
23 |
24 | /*Set the values*/
25 | lv_gauge_set_value(gauge1, 0, 10);
26 | lv_gauge_set_value(gauge1, 1, 20);
27 | lv_gauge_set_value(gauge1, 2, 30);
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2.py:
--------------------------------------------------------------------------------
1 | import usys as sys
2 | from lv_colors import lv_colors
3 |
4 | try:
5 | with open('../../../assets/img_hand_argb.bin','rb') as f:
6 | hand_img_data = f.read()
7 | except:
8 | try:
9 | with open('images/img_hand_rgb565.bin','rb') as f:
10 | hand_img_data = f.read()
11 | except:
12 | print("Could not find img_hand file")
13 | sys.exit()
14 |
15 |
16 | # create the hands image data
17 |
18 | img_hand_dsc = lv.img_dsc_t(
19 | {
20 | "header": {"always_zero": 0, "w": 100, "h": 9, "cf": lv.img.CF.TRUE_COLOR_ALPHA},
21 | "data": hand_img_data,
22 | "data_size": len(hand_img_data),
23 | }
24 | )
25 |
26 | # needle colors
27 | needle_colors=[lv_colors.BLUE,lv_colors.ORANGE,lv_colors.PURPLE]
28 |
29 | # create the gauge
30 | gauge1=lv.gauge(lv.scr_act(),None)
31 | gauge1.set_needle_count(3, needle_colors)
32 | gauge1.set_size(200,200)
33 | gauge1.align(None,lv.ALIGN.CENTER,0,0)
34 | gauge1.set_needle_img(img_hand_dsc, 4, 4)
35 | gauge1.set_style_local_image_recolor_opa(lv.gauge.PART.NEEDLE, lv.STATE.DEFAULT, lv.OPA.COVER)
36 |
37 | # Set the values
38 | gauge1.set_value(0, 10)
39 | gauge1.set_value(1, 20)
40 | gauge1.set_value(2, 30)
41 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_gauge/lv_ex_gauge_2_png.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | from imagetools import get_png_info, open_png
3 |
4 | # Register PNG image decoder
5 | decoder = lv.img.decoder_create()
6 | decoder.info_cb = get_png_info
7 | decoder.open_cb = open_png
8 |
9 | # Create an image
10 |
11 | with open('img_hand.png','rb') as f:
12 | png_data = f.read()
13 |
14 | img_hand_dsc = lv.img_dsc_t({
15 | 'data_size': len(png_data),
16 | 'data': png_data
17 | })
18 | # needle colors
19 | needle_colors=[lv_colors.BLUE,lv_colors.ORANGE,lv_colors.PURPLE]
20 |
21 | # create the gauge
22 | gauge1=lv.gauge(lv.scr_act(),None)
23 | gauge1.set_needle_count(3, needle_colors)
24 | gauge1.set_size(200,200)
25 | gauge1.align(None,lv.ALIGN.CENTER,0,0)
26 | gauge1.set_needle_img(img_hand_dsc, 4, 4)
27 | gauge1.set_style_local_image_recolor_opa(lv.gauge.PART.NEEDLE, lv.STATE.DEFAULT, lv.OPA.COVER)
28 |
29 | # Set the values
30 | gauge1.set_value(0, 10)
31 | gauge1.set_value(1, 20)
32 | gauge1.set_value(2, 30)
33 |
34 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/ex1_img.py:
--------------------------------------------------------------------------------
1 | try:
2 | with open('../../../assets/img_cogwheel_argb.bin','rb') as f:
3 | cogwheel_img_data = f.read()
4 | except:
5 | try:
6 | with open('images/img_cogwheel_rgb565.bin','rb') as f:
7 | cogwheel_img_data = f.read()
8 | except:
9 | print("Could not find binary img_cogwheel file")
10 |
11 | # create the cogwheel image data
12 |
13 | cogwheel_img_dsc = lv.img_dsc_t(
14 | {
15 | "header": {"always_zero": 0, "w": 100, "h": 100, "cf": lv.img.CF.TRUE_COLOR_ALPHA},
16 | "data": cogwheel_img_data,
17 | "data_size": len(cogwheel_img_data),
18 | }
19 | )
20 | # Create an image using the decoder
21 |
22 | img1 = lv.img(lv.scr_act(),None)
23 | lv.img.cache_set_size(2)
24 | img1.align(lv.scr_act(), lv.ALIGN.CENTER, 0, -50)
25 | img1.set_src(cogwheel_img_dsc)
26 |
27 | img2 = lv.img(lv.scr_act(), None)
28 | img2.set_src(lv.SYMBOL.OK+"Accept")
29 | img2.align(img1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20)
30 |
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/ex1_img_png.py:
--------------------------------------------------------------------------------
1 | import usys as sys
2 | from imagetools import get_png_info, open_png
3 |
4 | # Register PNG image decoder
5 | decoder = lv.img.decoder_create()
6 | decoder.info_cb = get_png_info
7 | decoder.open_cb = open_png
8 |
9 | try:
10 | with open('../../../assets/img_cogwheel_argb.png','rb') as f:
11 | png_data = f.read()
12 | except:
13 | try:
14 | with open('images/img_cogwheel_argb.png','rb') as f:
15 | png_data = f.read()
16 | except:
17 | print("Could not find img_cogwheel png file")
18 | sys.exit()
19 |
20 | png_img_dsc = lv.img_dsc_t({
21 | 'data_size': len(png_data),
22 | 'data': png_data
23 | })
24 |
25 | # Create an image using the decoder
26 |
27 | img1 = lv.img(lv.scr_act(),None)
28 | lv.img.cache_set_size(2)
29 | img1.align(lv.scr_act(), lv.ALIGN.CENTER, 0, -50)
30 | img1.set_src(png_img_dsc)
31 |
32 | img2 = lv.img(lv.scr_act(), None)
33 | img2.set_src(lv.SYMBOL.OK+"Accept")
34 | img2.align(img1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20)
35 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Image from variable and symbol
5 | """""""""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_img/lv_ex_img_1
8 | :language: c
9 |
10 |
11 | Image recoloring
12 | """"""""""""""""
13 |
14 | .. lv_example:: lv_ex_widgets/lv_ex_img/lv_ex_img_2
15 | :language: c
16 |
17 |
18 | MicroPython
19 | ^^^^^^^^^^^
20 |
21 | No examples yet.
22 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_IMG
3 |
4 | /* Find the image here: https://github.com/lvgl/lv_examples/tree/master/assets */
5 | LV_IMG_DECLARE(img_cogwheel_argb);
6 |
7 | void lv_ex_img_1(void)
8 | {
9 | lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL);
10 | lv_img_set_src(img1, &img_cogwheel_argb);
11 | lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, -20);
12 |
13 | lv_obj_t * img2 = lv_img_create(lv_scr_act(), NULL);
14 | lv_img_set_src(img2, LV_SYMBOL_OK "Accept");
15 | lv_obj_align(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
16 | }
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_1.py:
--------------------------------------------------------------------------------
1 | from imagetools import get_png_info, open_png
2 |
3 | # Register PNG image decoder
4 | decoder = lv.img.decoder_create()
5 | decoder.info_cb = get_png_info
6 | decoder.open_cb = open_png
7 |
8 | with open('img_cogwheel_argb.png','rb') as f:
9 | png_data = f.read()
10 |
11 | png_img_dsc = lv.img_dsc_t({
12 | 'data_size': len(png_data),
13 | 'data': png_data
14 | })
15 |
16 | # Create an image using the decoder
17 |
18 | img1 = lv.img(lv.scr_act(),None)
19 | lv.img.cache_set_size(2)
20 | img1.align(lv.scr_act(), lv.ALIGN.CENTER, 0, -50)
21 | img1.set_src(png_img_dsc)
22 |
23 | img2 = lv.img(lv.scr_act(), None)
24 | img2.set_src(lv.SYMBOL.OK+"Accept")
25 | img2.align(img1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20)
26 |
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_3.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_IMG
3 |
4 | LV_IMG_DECLARE(img_cogwheel_argb);
5 |
6 | void lv_ex_img_3(void)
7 | {
8 | /* Now create the actual image */
9 | lv_obj_t * img = lv_img_create(lv_scr_act(), NULL);
10 | lv_img_set_src(img, &img_cogwheel_argb);
11 | lv_obj_align(img, NULL, LV_ALIGN_CENTER, 50, 50);
12 | lv_img_set_pivot(img, 0, 0); /*Rotate around the top left corner*/
13 |
14 | lv_anim_t a;
15 | lv_anim_init(&a);
16 | lv_anim_set_var(&a, img);
17 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t)lv_img_set_angle);
18 | lv_anim_set_values(&a, 0, 3600);
19 | lv_anim_set_time(&a, 5000);
20 | lv_anim_set_repeat_count(&a, LV_ANIM_REPEAT_INFINITE);
21 | lv_anim_start(&a);
22 |
23 | lv_anim_set_exec_cb(&a, (lv_anim_exec_xcb_t)lv_img_set_zoom);
24 | lv_anim_set_values(&a, 128, 400);
25 | lv_anim_set_playback_time(&a, 1000);
26 | lv_anim_start(&a);
27 |
28 | }
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_img/lv_ex_img_3.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_imgbtn/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Image button
5 | """""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_imgbtn/lv_ex_imgbtn_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_imgbtn/lv_ex_imgbtn_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_imgbtn/lv_ex_imgbtn_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_keyboard/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Keyboard with text area
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | Keyboard with text area
14 | """""""""""""""""""""""
15 |
16 | No examples yet.
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_keyboard/lv_ex_keyboard_1.py:
--------------------------------------------------------------------------------
1 | LV_DPI=130
2 | LV_VER_RES=240
3 |
4 | def event_handler(source,evt):
5 | if evt == lv.EVENT.VALUE_CHANGED:
6 | print("Value:",textarea.get_text())
7 |
8 | # create a keyboard and apply the styles
9 | keyb = lv.keyboard(lv.scr_act(),None)
10 | keyb.set_cursor_manage(True)
11 |
12 | #Create a text area. The keyboard will write here
13 | ta=lv.textarea(lv.scr_act(),None)
14 | ta.align(None,lv.ALIGN.IN_TOP_MID,0,LV_DPI//16)
15 | ta.set_text("")
16 | max_h = LV_VER_RES // 2 - LV_DPI // 8
17 | if ta.get_height() > max_h:
18 | ta.set_height(max_h)
19 |
20 | # Assign the text area to the keyboard*/
21 | keyb.set_textarea(ta)
22 |
23 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Label recoloring and scrolling
5 | """""""""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_label/lv_ex_label_1
8 | :language: c
9 |
10 | Text shadow
11 | """"""""""""
12 |
13 | .. lv_example:: lv_ex_widgets/lv_ex_label/lv_ex_label_2
14 | :language: c
15 |
16 | Align labels
17 | """"""""""""
18 |
19 | .. lv_example:: lv_ex_widgets/lv_ex_label/lv_ex_label_3
20 | :language: c
21 |
22 | MicroPython
23 | ^^^^^^^^^^^
24 |
25 | No examples yet.
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_LABEL
3 |
4 | void lv_ex_label_1(void)
5 | {
6 | lv_obj_t * label1 = lv_label_create(lv_scr_act(), NULL);
7 | lv_label_set_long_mode(label1, LV_LABEL_LONG_BREAK); /*Break the long lines*/
8 | lv_label_set_recolor(label1, true); /*Enable re-coloring by commands in the text*/
9 | lv_label_set_align(label1, LV_LABEL_ALIGN_CENTER); /*Center aligned lines*/
10 | lv_label_set_text(label1, "#0000ff Re-color# #ff00ff words# #ff0000 of a# label "
11 | "and wrap long text automatically.");
12 | lv_obj_set_width(label1, 150);
13 | lv_obj_align(label1, NULL, LV_ALIGN_CENTER, 0, -30);
14 |
15 | lv_obj_t * label2 = lv_label_create(lv_scr_act(), NULL);
16 | lv_label_set_long_mode(label2, LV_LABEL_LONG_SROLL_CIRC); /*Circular scroll*/
17 | lv_obj_set_width(label2, 150);
18 | lv_label_set_text(label2, "It is a circularly scrolling text. ");
19 | lv_obj_align(label2, NULL, LV_ALIGN_CENTER, 0, 30);
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_1.py:
--------------------------------------------------------------------------------
1 | label1 = lv.label(lv.scr_act(),None)
2 | label1.set_long_mode(lv.label.LONG.BREAK) # Break the long lines
3 | label1.set_recolor(True) # Enable re-coloring by commands in the text
4 | label1.set_align(lv.label.ALIGN.CENTER) # Center aligned lines
5 | label1.set_text(
6 | """#0000ff Re-color# #ff00ff words# #ff0000 of a# label
7 | and wrap long text automatically.""")
8 | label1.set_width(150)
9 | label1.align(None,lv.ALIGN.CENTER, 0, -30)
10 |
11 | label2 = lv.label(lv.scr_act(), None)
12 | label2.set_long_mode(lv.label.LONG.SROLL_CIRC)
13 | label2.set_width(150)
14 | label2.set_text("It is a circularly scrolling text. ")
15 | label2.align(None, lv.ALIGN.CENTER, 0, 30)
16 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_2.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 |
3 | # Create a style for the shadow
4 | label_shadow_style = lv.style_t()
5 | label_shadow_style.init()
6 | label_shadow_style.set_text_opa(lv.STATE.DEFAULT,lv.OPA._50)
7 | label_shadow_style.set_text_color(lv.STATE.DEFAULT, lv_colors.RED);
8 |
9 | # Create a label for the shadow first (it's in the background)
10 | shadow_label = lv.label(lv.scr_act())
11 | shadow_label.add_style(lv.label.PART.MAIN, label_shadow_style)
12 |
13 | # Create the main label
14 | main_label = lv.label(lv.scr_act())
15 | main_label.set_text("A simple method to create\n" +
16 | "shadows on text\n" +
17 | "It even works with\n\n" +
18 | "newlines and spaces.")
19 |
20 | # Set the same text for the shadow label
21 | shadow_label.set_text(main_label.get_text())
22 |
23 | # Position the main label
24 | main_label.align(None, lv.ALIGN.CENTER, 0, 0)
25 |
26 | # Shift the second label down and to the right by 1 pixel
27 | shadow_label.align(main_label, lv.ALIGN.IN_TOP_LEFT, 1, 1)
28 |
29 | while True:
30 | lv.task_handler()
31 | time.sleep_ms(5)
32 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_label/lv_ex_label_3.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_led/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | LED with custom style
5 | """""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_led/lv_ex_led_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_led/lv_ex_led_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_LED
3 |
4 | void lv_ex_led_1(void)
5 | {
6 | /*Create a LED and switch it OFF*/
7 | lv_obj_t * led1 = lv_led_create(lv_scr_act(), NULL);
8 | lv_obj_align(led1, NULL, LV_ALIGN_CENTER, -80, 0);
9 | lv_led_off(led1);
10 |
11 | /*Copy the previous LED and set a brightness*/
12 | lv_obj_t * led2 = lv_led_create(lv_scr_act(), led1);
13 | lv_obj_align(led2, NULL, LV_ALIGN_CENTER, 0, 0);
14 | lv_led_set_bright(led2, 190);
15 |
16 | /*Copy the previous LED and switch it ON*/
17 | lv_obj_t * led3 = lv_led_create(lv_scr_act(), led1);
18 | lv_obj_align(led3, NULL, LV_ALIGN_CENTER, 80, 0);
19 | lv_led_on(led3);
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_led/lv_ex_led_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_led/lv_ex_led_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_led/lv_ex_led_1.py:
--------------------------------------------------------------------------------
1 | # Create a LED and switch it OFF
2 | led1 = lv.led(lv.scr_act(),None)
3 | led1.align(None,lv.ALIGN.CENTER,-80,0)
4 | led1.off()
5 |
6 | # Copy the previous LED and set a brightness
7 | led2=lv.led(lv.scr_act(), led1)
8 | led2.align(None,lv.ALIGN.CENTER,0,0)
9 | led2.set_bright(190)
10 |
11 | # Copy the previous LED and switch it ON
12 | led3=lv.led(lv.scr_act(), led1)
13 | led3.align(None,lv.ALIGN.CENTER,80,0)
14 | led3.on()
15 |
16 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_line/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Line
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_line/lv_ex_line_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_line/lv_ex_line_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_LINE
3 |
4 | void lv_ex_line_1(void)
5 | {
6 | /*Create an array for the points of the line*/
7 | static lv_point_t line_points[] = { {5, 5}, {70, 70}, {120, 10}, {180, 60}, {240, 10} };
8 |
9 | /*Create style*/
10 | static lv_style_t style_line;
11 | lv_style_init(&style_line);
12 | lv_style_set_line_width(&style_line, LV_STATE_DEFAULT, 8);
13 | lv_style_set_line_color(&style_line, LV_STATE_DEFAULT, LV_COLOR_BLUE);
14 | lv_style_set_line_rounded(&style_line, LV_STATE_DEFAULT, true);
15 |
16 | /*Create a line and apply the new style*/
17 | lv_obj_t * line1;
18 | line1 = lv_line_create(lv_scr_act(), NULL);
19 | lv_line_set_points(line1, line_points, 5); /*Set the points*/
20 | lv_obj_add_style(line1, LV_LINE_PART_MAIN, &style_line); /*Set the points*/
21 | lv_obj_align(line1, NULL, LV_ALIGN_CENTER, 0, 0);
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_line/lv_ex_line_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_line/lv_ex_line_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_line/lv_ex_line_1.py:
--------------------------------------------------------------------------------
1 | from lv_colors import lv_colors
2 | import time
3 |
4 | # Create an array for the points of the line
5 | line_points = [ {"x":5, "y":5},
6 | {"x":70, "y":70},
7 | {"x":120, "y":10},
8 | {"x":180, "y":60},
9 | {"x":240, "y":10}]
10 |
11 | # Create new style (thick dark blue)
12 | style_line = lv.style_t()
13 | style_line.init()
14 | style_line.set_line_width(lv.STATE.DEFAULT, 8)
15 | style_line.set_line_color(lv.STATE.DEFAULT, lv_colors.BLUE)
16 | style_line.set_line_rounded(lv.STATE.DEFAULT, True)
17 |
18 | # Copy the previous line and apply the new style
19 | line1 = lv.line(lv.scr_act())
20 | line1.set_points(line_points, len(line_points)) # Set the points
21 | line1.add_style(lv.line.PART.MAIN, style_line)
22 | line1.align(None, lv.ALIGN.CENTER, 0, 0)
23 |
24 | while True:
25 | lv.task_handler()
26 | time.sleep_ms(5)
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_linemeter/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Line meter
5 | """"""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_linemeter/lv_ex_linemeter_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_linemeter/lv_ex_linemeter_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_LINEMETER
3 |
4 | void lv_ex_linemeter_1(void)
5 | {
6 | /*Create a line meter */
7 | lv_obj_t * lmeter;
8 | lmeter = lv_linemeter_create(lv_scr_act(), NULL);
9 | lv_linemeter_set_range(lmeter, 0, 100); /*Set the range*/
10 | lv_linemeter_set_value(lmeter, 80); /*Set the current value*/
11 | lv_linemeter_set_scale(lmeter, 240, 21); /*Set the angle and number of lines*/
12 | lv_obj_set_size(lmeter, 150, 150);
13 | lv_obj_align(lmeter, NULL, LV_ALIGN_CENTER, 0, 0);
14 | }
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_linemeter/lv_ex_linemeter_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_linemeter/lv_ex_linemeter_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_linemeter/lv_ex_linemeter_1.py:
--------------------------------------------------------------------------------
1 | lmeter = lv.linemeter(lv.scr_act(),None)
2 | lmeter.set_range(0,100) # Set the range
3 | lmeter.set_value(80) # Set the current value
4 | lmeter.set_scale(240,21) # Set the angle and number of lines
5 | lmeter.set_size(150,150)
6 | lmeter.align(None,lv.ALIGN.CENTER,0,0)
7 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_list/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple List
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_list/lv_ex_list_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_list/lv_ex_list_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_list/lv_ex_list_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_list/lv_ex_list_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(obj, event):
2 | list_btn = lv.list.__cast__(obj)
3 | if event == lv.EVENT.CLICKED:
4 | print("Clicked: %s" % list_btn.get_btn_text())
5 |
6 | # Create a list
7 | list1 = lv.list(lv.scr_act())
8 | list1.set_size(160, 200)
9 | list1.align(None, lv.ALIGN.CENTER, 0, 0)
10 |
11 | # Add buttons to the list
12 |
13 | list_btn = list1.add_btn(lv.SYMBOL.FILE, "New")
14 | list_btn.set_event_cb(event_handler)
15 |
16 | list_btn = list1.add_btn(lv.SYMBOL.DIRECTORY, "Open")
17 | list_btn.set_event_cb(event_handler)
18 |
19 | list_btn = list1.add_btn(lv.SYMBOL.CLOSE, "Delete")
20 | list_btn.set_event_cb(event_handler)
21 |
22 | list_btn = list1.add_btn(lv.SYMBOL.EDIT, "Edit")
23 | list_btn.set_event_cb(event_handler)
24 |
25 | list_btn = list1.add_btn(lv.SYMBOL.SAVE, "Save")
26 | list_btn.set_event_cb(event_handler)
27 |
28 | list_btn = list1.add_btn(lv.SYMBOL.BELL, "Notify")
29 | list_btn.set_event_cb(event_handler)
30 |
31 | list_btn = list1.add_btn(lv.SYMBOL.BATTERY_FULL, "Battery")
32 | list_btn.set_event_cb(event_handler)
33 |
34 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Message box
5 | """""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_1
8 | :language: c
9 |
10 |
11 |
12 | Modal
13 | """"""""""""""""
14 |
15 | .. lv_example:: lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_2
16 | :language: c
17 |
18 |
19 | MicroPython
20 | ^^^^^^^^^^^
21 |
22 | No examples yet.
23 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_MSGBOX
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | printf("Button: %s\n", lv_msgbox_get_active_btn_text(obj));
9 | }
10 | }
11 |
12 | void lv_ex_msgbox_1(void)
13 | {
14 | static const char * btns[] ={"Apply", "Close", ""};
15 |
16 | lv_obj_t * mbox1 = lv_msgbox_create(lv_scr_act(), NULL);
17 | lv_msgbox_set_text(mbox1, "A message box with two buttons.");
18 | lv_msgbox_add_btns(mbox1, btns);
19 | lv_obj_set_width(mbox1, 200);
20 | lv_obj_set_event_cb(mbox1, event_handler);
21 | lv_obj_align(mbox1, NULL, LV_ALIGN_CENTER, 0, 0); /*Align to the corner*/
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(obj, event):
2 | if event == lv.EVENT.VALUE_CHANGED:
3 | print("Button: %s" % obj.get_active_btn_text())
4 |
5 | btns = ["Apply", "Close", ""]
6 |
7 | mbox1 = lv.msgbox(lv.scr_act())
8 | mbox1.set_text("A message box with two buttons.");
9 | mbox1.add_btns(btns)
10 | mbox1.set_width(200)
11 | mbox1.set_event_cb(event_handler)
12 | mbox1.align(None, lv.ALIGN.CENTER, 0, 0) # Align to the corner
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_msgbox/lv_ex_msgbox_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_obj/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Base objects with custom styles
5 | """"""""""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_obj/lv_ex_obj_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_obj/lv_ex_obj_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 |
3 | void lv_ex_obj_1(void)
4 | {
5 | lv_obj_t * obj1;
6 | obj1 = lv_obj_create(lv_scr_act(), NULL);
7 | lv_obj_set_size(obj1, 100, 50);
8 | lv_obj_align(obj1, NULL, LV_ALIGN_CENTER, -60, -30);
9 |
10 | /*Copy the previous object and enable drag*/
11 | lv_obj_t * obj2;
12 | obj2 = lv_obj_create(lv_scr_act(), obj1);
13 | lv_obj_align(obj2, NULL, LV_ALIGN_CENTER, 0, 0);
14 | lv_obj_set_drag(obj2, true);
15 |
16 | static lv_style_t style_shadow;
17 | lv_style_init(&style_shadow);
18 | lv_style_set_shadow_width(&style_shadow, LV_STATE_DEFAULT, 10);
19 | lv_style_set_shadow_spread(&style_shadow, LV_STATE_DEFAULT, 5);
20 | lv_style_set_shadow_color(&style_shadow, LV_STATE_DEFAULT, LV_COLOR_BLUE);
21 |
22 | /*Copy the previous object (drag is already enabled)*/
23 | lv_obj_t * obj3;
24 | obj3 = lv_obj_create(lv_scr_act(), obj2);
25 | lv_obj_add_style(obj3, LV_OBJ_PART_MAIN, &style_shadow);
26 | lv_obj_align(obj3, NULL, LV_ALIGN_CENTER, 60, 30);
27 | }
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_obj/lv_ex_obj_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_obj/lv_ex_obj_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_obj/lv_ex_obj_1.py:
--------------------------------------------------------------------------------
1 | obj1 = lv.obj(lv.scr_act(),None)
2 | obj1.set_size(100,50)
3 | obj1.align(None,lv.ALIGN.CENTER, -60, -30)
4 |
5 | # Copy the previous object and enable drag
6 | obj2 = lv.obj(lv.scr_act(),obj1)
7 | #obj2.set_size(100,50)
8 | obj2.align(None,lv.ALIGN.CENTER, 0, 0)
9 | obj2.set_drag(True)
10 |
11 | # create style
12 | style_shadow = lv.style_t()
13 | style_shadow.init()
14 | style_shadow.set_shadow_width(lv.STATE.DEFAULT, 10)
15 | style_shadow.set_shadow_spread(lv.STATE.DEFAULT, 5)
16 | LV_COLOR_BLUE=lv.color_hex3(0xF)
17 | style_shadow.set_shadow_color(lv.STATE.DEFAULT,LV_COLOR_BLUE)
18 |
19 | # Copy the previous object (drag is already enabled)
20 | obj3 = lv.obj(lv.scr_act(),obj2)
21 | obj3.add_style(obj3.PART.MAIN,style_shadow)
22 | obj3.align(None,lv.ALIGN.CENTER, 60, 30)
23 |
24 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_objmask/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Several object masks
5 | """"""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_1
8 | :language: c
9 |
10 |
11 | Text mask
12 | """""""""""""""""""
13 |
14 | .. lv_example:: lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_2
15 | :language: c
16 |
17 | MicroPython
18 | ^^^^^^^^^^^
19 |
20 | No examples yet.
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_objmask/lv_ex_objmask_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_page/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Page with scrollbar
5 | """""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_page/lv_ex_page_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_page/lv_ex_page_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_page/lv_ex_page_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_page/lv_ex_page_1.py:
--------------------------------------------------------------------------------
1 | # create a page
2 | page = lv.page(lv.scr_act(),None)
3 | page.set_size(150,200)
4 | page.align(None,lv.ALIGN.CENTER,0,0)
5 | # page.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
6 |
7 | # Create a label on the page
8 | label = lv.label(page, None);
9 | label.set_long_mode(lv.label.LONG.BREAK); # Automatically break long lines
10 | label.set_width(lv.page.get_width_fit(page)); # Set the label width to max value to not show hor. scroll bars*/
11 | label.set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n"
12 | "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n"
13 | "Ut enim ad minim veniam, quis nostrud exercitation ullamco\n"
14 | "laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n"
15 | "dolor in reprehenderit in voluptate velit esse cillum dolore\n"
16 | "eu fugiat nulla pariatur.\n"
17 | "Excepteur sint occaecat cupidatat non proident, sunt in culpa\n"
18 | "qui officia deserunt mollit anim id est laborum.")
19 |
20 |
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_page/lv_ex_page_2.py:
--------------------------------------------------------------------------------
1 | # create a page
2 | page = lv.page(lv.scr_act(),None)
3 | page.set_size(200,200)
4 | page.align(None,lv.ALIGN.CENTER,0,0)
5 | # page.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
6 |
7 | # Create a label on the page
8 | label = lv.label(page, None);
9 | #label.set_long_mode(lv.label.LONG.BREAK); # Automatically break long lines
10 | label.set_width(lv.page.get_width_fit(page)); # Set the label width to max value to not show hor. scroll bars*/
11 | label.set_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit,\n"
12 | "sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n"
13 | "Ut enim ad minim veniam, quis nostrud exercitation ullamco\n"
14 | "laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure\n"
15 | "dolor in reprehenderit in voluptate velit esse cillum dolore\n"
16 | "eu fugiat nulla pariatur.\n"
17 | "Excepteur sint occaecat cupidatat non proident, sunt in culpa\n"
18 | "qui officia deserunt mollit anim id est laborum.")
19 |
20 |
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_roller/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Roller
5 | """"""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_roller/lv_ex_roller_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_roller/lv_ex_roller_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_roller/lv_ex_roller_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_roller/lv_ex_roller_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | month=" "*10
4 | roller.get_selected_str(month,len(month))
5 | print("Selected month: ",month)
6 |
7 | roller = lv.roller(lv.scr_act(),None)
8 | roller.set_options("January\n"
9 | "February\n"
10 | "March\n"
11 | "April\n"
12 | "May\n"
13 | "June\n"
14 | "July\n"
15 | "August\n"
16 | "September\n"
17 | "October\n"
18 | "November\n"
19 | "December",
20 | lv.roller.MODE.INIFINITE)
21 | roller.set_visible_row_count(4)
22 | roller.align(None,lv.ALIGN.CENTER,0,0)
23 | roller.set_event_cb(event_handler)
24 |
25 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Slider with custom style
5 | """""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_slider/lv_ex_slider_1
8 | :language: c
9 |
10 | Set value with slider
11 | """""""""""""""""""""""
12 |
13 | .. lv_example:: lv_ex_widgets/lv_ex_slider/lv_ex_slider_2
14 | :language: c
15 |
16 |
17 | MicroPython
18 | ^^^^^^^^^^^
19 |
20 | No examples yet.
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_SLIDER
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | printf("Value: %d\n", lv_slider_get_value(obj));
9 | }
10 | }
11 |
12 | void lv_ex_slider_1(void)
13 | {
14 | /*Create a slider*/
15 | lv_obj_t * slider = lv_slider_create(lv_scr_act(), NULL);
16 | lv_obj_align(slider, NULL, LV_ALIGN_CENTER, 0, 0);
17 | lv_obj_set_event_cb(slider, event_handler);
18 | }
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | print("Value:",slider.get_value())
4 |
5 | # create a slider
6 | slider = lv.slider(lv.scr_act(),None)
7 | slider.set_width(200)
8 | slider.align(None,lv.ALIGN.CENTER,0,0)
9 | slider.set_event_cb(event_handler)
10 |
11 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_slider/lv_ex_slider_2.py:
--------------------------------------------------------------------------------
1 | def event_handler(source,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | # print(slider.get_value())
4 | slider_label.set_text(str(slider.get_value()))
5 |
6 | # Create a slider in the center of the display
7 | slider = lv.slider(lv.scr_act(),None)
8 | slider.set_width(200)
9 | slider.align(None,lv.ALIGN.CENTER,0,0)
10 | slider.set_event_cb(event_handler)
11 | slider.set_range(0, 100)
12 |
13 | # Create a label below the slider
14 | slider_label=lv.label(lv.scr_act(), None)
15 | slider_label.set_text("0")
16 | slider_label.set_auto_realign(True)
17 | slider_label.align(slider,lv.ALIGN.OUT_BOTTOM_MID,0,10)
18 |
19 | # Create an informative label
20 | info_label=lv.label(lv.scr_act(), None)
21 | info_label.set_text(
22 | """Welcome to the slider +
23 | label demo!
24 | Move the slider
25 | and see that the label
26 | updates to match it."""
27 | )
28 | info_label.align(None, lv.ALIGN.IN_TOP_LEFT, 10, 10)
29 |
30 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinbox/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Spinbox
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_spinbox/lv_ex_spinbox_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinbox/lv_ex_spinbox_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinbox/lv_ex_spinbox_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinbox/lv_ex_spinbox_1.py:
--------------------------------------------------------------------------------
1 | def increment_event_cb(source,evt):
2 | if evt == lv.EVENT.SHORT_CLICKED or evt == lv.EVENT.LONG_PRESSED_REPEAT:
3 | spinbox.increment()
4 |
5 | def decrement_event_cb(source,evt):
6 | if evt == lv.EVENT.SHORT_CLICKED or evt == lv.EVENT.LONG_PRESSED_REPEAT:
7 | spinbox.decrement()
8 |
9 | spinbox = lv.spinbox(lv.scr_act(),None)
10 | spinbox.set_range(-1000,90000)
11 | spinbox.set_digit_format(5,2)
12 | spinbox.step_prev()
13 | spinbox.set_width(100)
14 | spinbox.align(None,lv.ALIGN.CENTER,0,0)
15 |
16 | h = spinbox.get_height()
17 | btn = lv.btn(lv.scr_act(),None)
18 | btn.set_size(h,h)
19 | btn.align(spinbox,lv.ALIGN.OUT_RIGHT_MID, 5, 0)
20 | lv.theme_apply(btn,lv.THEME.SPINBOX_BTN)
21 |
22 | btn.set_style_local_value_str(lv.btn.PART.MAIN, lv.STATE.DEFAULT, lv.SYMBOL.PLUS)
23 | btn.set_event_cb(increment_event_cb)
24 |
25 | btn = lv.btn(lv.scr_act(), btn)
26 | btn.align(spinbox, lv.ALIGN.OUT_LEFT_MID, -5, 0)
27 | btn.set_event_cb(decrement_event_cb)
28 | btn.set_style_local_value_str(lv.btn.PART.MAIN, lv.STATE.DEFAULT, lv.SYMBOL.MINUS)
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinner/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple spinner
5 | """"""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_SPINNER
3 |
4 | void lv_ex_spinner_1(void)
5 | {
6 | /*Create a Preloader object*/
7 | lv_obj_t * preload = lv_spinner_create(lv_scr_act(), NULL);
8 | lv_obj_set_size(preload, 100, 100);
9 | lv_obj_align(preload, NULL, LV_ALIGN_CENTER, 0, 0);
10 | }
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_spinner/lv_ex_spinner_1.py:
--------------------------------------------------------------------------------
1 | # create a Preloader object
2 | preload = lv.spinner(lv.scr_act(), None)
3 | preload.set_size(100, 100)
4 | preload.align(None, lv.ALIGN.CENTER, 0, 0)
5 |
6 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_switch/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Switch
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_switch/lv_ex_switch_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_switch/lv_ex_switch_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_SWITCH
4 |
5 | static void event_handler(lv_obj_t * obj, lv_event_t event)
6 | {
7 | if(event == LV_EVENT_VALUE_CHANGED) {
8 | printf("State: %s\n", lv_switch_get_state(obj) ? "On" : "Off");
9 | }
10 | }
11 |
12 | void lv_ex_switch_1(void)
13 | {
14 | /*Create a switch and apply the styles*/
15 | lv_obj_t *sw1 = lv_switch_create(lv_scr_act(), NULL);
16 | lv_obj_align(sw1, NULL, LV_ALIGN_CENTER, 0, -50);
17 | lv_obj_set_event_cb(sw1, event_handler);
18 |
19 | /*Copy the first switch and turn it ON*/
20 | lv_obj_t *sw2 = lv_switch_create(lv_scr_act(), sw1);
21 | lv_switch_on(sw2, LV_ANIM_ON);
22 | lv_obj_align(sw2, NULL, LV_ALIGN_CENTER, 0, 50);
23 | }
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_switch/lv_ex_switch_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_switch/lv_ex_switch_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_switch/lv_ex_switch_1.py:
--------------------------------------------------------------------------------
1 | def event_handler(obj,evt):
2 | if evt == lv.EVENT.VALUE_CHANGED:
3 | state = obj.get_state()
4 | if state:
5 | print("State: On")
6 | else:
7 | print("State: Off")
8 |
9 | #Create a switch and apply the styles
10 | sw1 = lv.switch(lv.scr_act(), None)
11 | sw1.align(None, lv.ALIGN.CENTER, 0, -50)
12 | sw1.set_event_cb(event_handler)
13 |
14 | # Copy the first switch and turn it ON
15 | sw2=lv.switch(lv.scr_act(),sw1)
16 | sw2.on(lv.ANIM.ON)
17 | sw2.set_event_cb(event_handler)
18 | sw2.align(None, lv.ALIGN.CENTER, 0, 50)
19 |
20 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_table/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple table
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_table/lv_ex_table_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_table/lv_ex_table_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_table/lv_ex_table_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_table/lv_ex_table_1.py:
--------------------------------------------------------------------------------
1 | table = lv.table(lv.scr_act(), None)
2 | table.set_col_cnt(2)
3 | table.set_row_cnt(4)
4 | table.set_size(200,200)
5 | table.align(lv.scr_act(), lv.ALIGN.CENTER, -15, 0)
6 |
7 | # Make the cells of the first row center aligned
8 | table.set_col_width(0,100)
9 | table.set_cell_align(0, 0, lv.label.ALIGN.CENTER)
10 | table.set_cell_align(0, 1, lv.label.ALIGN.CENTER)
11 |
12 | # Align the price values to the right in the 2nd column
13 | table.set_col_width(1,100)
14 | table.set_cell_align(1, 1, lv.label.ALIGN.RIGHT)
15 | table.set_cell_align(2, 1, lv.label.ALIGN.RIGHT)
16 | table.set_cell_align(3, 1, lv.label.ALIGN.RIGHT)
17 |
18 | table.set_cell_type(0, 0, 2)
19 | table.set_cell_type(0, 1, 2)
20 |
21 | # Fill the first column
22 | table.set_cell_value(0, 0, "Name")
23 | table.set_cell_value(1, 0, "Apple")
24 | table.set_cell_value(2, 0, "Banana")
25 | table.set_cell_value(3, 0, "Citron")
26 |
27 | # Fill the second column
28 | table.set_cell_value(0, 1, "Price")
29 | table.set_cell_value(1, 1, "$7")
30 | table.set_cell_value(2, 1, "$4")
31 | table.set_cell_value(3, 1, "$6")
32 |
33 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tabview/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Tabview
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_tabview/lv_ex_tabview_1
8 | :language: c
9 |
10 |
11 | MicroPython
12 | ^^^^^^^^^^^
13 |
14 | No examples yet.
15 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tabview/lv_ex_tabview_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_TABVIEW
3 |
4 | void lv_ex_tabview_1(void)
5 | {
6 | /*Create a Tab view object*/
7 | lv_obj_t *tabview;
8 | tabview = lv_tabview_create(lv_scr_act(), NULL);
9 |
10 | /*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
11 | lv_obj_t *tab1 = lv_tabview_add_tab(tabview, "Tab 1");
12 | lv_obj_t *tab2 = lv_tabview_add_tab(tabview, "Tab 2");
13 | lv_obj_t *tab3 = lv_tabview_add_tab(tabview, "Tab 3");
14 |
15 |
16 | /*Add content to the tabs*/
17 | lv_obj_t * label = lv_label_create(tab1, NULL);
18 | lv_label_set_text(label, "This the first tab\n\n"
19 | "If the content\n"
20 | "of a tab\n"
21 | "become too long\n"
22 | "the it \n"
23 | "automatically\n"
24 | "become\n"
25 | "scrollable.");
26 |
27 | label = lv_label_create(tab2, NULL);
28 | lv_label_set_text(label, "Second tab");
29 |
30 | label = lv_label_create(tab3, NULL);
31 | lv_label_set_text(label, "Third tab");
32 | }
33 | #endif
34 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tabview/lv_ex_tabview_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tabview/lv_ex_tabview_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tabview/lv_ex_tabview_1.py:
--------------------------------------------------------------------------------
1 | # Create a Tab view object
2 | tabview = lv.tabview(lv.scr_act(), None)
3 |
4 | # Add 3 tabs (the tabs are page (lv_page) and can be scrolled
5 | tab1=tabview.add_tab("Tab 1")
6 | tab2=tabview.add_tab("Tab 2")
7 | tab3=tabview.add_tab("Tab 3")
8 |
9 |
10 | # Add content to the tabs
11 | label = lv.label(tab1,None)
12 | label.set_text('''
13 | This the first tab\n
14 | If the content
15 | of a tab
16 | become too long
17 | then it
18 | automatically
19 | becomes
20 | scrollable.
21 | ''')
22 |
23 | label = lv.label(tab2,None)
24 | label.set_text("Second tab")
25 |
26 | label = lv.label(tab3, None)
27 | label.set_text("Third tab");
28 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple Text area
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_1
8 | :language: c
9 |
10 |
11 | Text area with password field
12 | """""""""""""""""""""""""""""
13 |
14 | .. lv_example:: lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_2
15 | :language: c
16 |
17 | Text auto-formatting
18 | """""""""""""""""""""""""""""
19 |
20 | .. lv_example:: lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_3
21 | :language: c
22 |
23 | MicroPython
24 | ^^^^^^^^^^^
25 |
26 | No examples yet.
27 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #include
3 | #if LV_USE_TEXTAREA
4 |
5 | lv_obj_t * ta1;
6 |
7 | static void event_handler(lv_obj_t * obj, lv_event_t event)
8 | {
9 | if(event == LV_EVENT_VALUE_CHANGED) {
10 | printf("Value: %s\n", lv_textarea_get_text(obj));
11 | }
12 | else if(event == LV_EVENT_LONG_PRESSED_REPEAT) {
13 | /*For simple test: Long press the Text are to add the text below*/
14 | const char * txt = "\n\nYou can scroll it if the text is long enough.\n";
15 | static uint16_t i = 0;
16 | if(txt[i] != '\0') {
17 | lv_textarea_add_char(ta1, txt[i]);
18 | i++;
19 | }
20 | }
21 | }
22 |
23 | void lv_ex_textarea_1(void)
24 | {
25 | ta1 = lv_textarea_create(lv_scr_act(), NULL);
26 | lv_obj_set_size(ta1, 200, 100);
27 | lv_obj_align(ta1, NULL, LV_ALIGN_CENTER, 0, 0);
28 | lv_textarea_set_text(ta1, "A text in a Text Area"); /*Set an initial text*/
29 | lv_obj_set_event_cb(ta1, event_handler);
30 | }
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_1.py:
--------------------------------------------------------------------------------
1 | class TextArea():
2 | def __init__(self):
3 | self.i=0
4 | # create a textarea
5 | self.ta = lv.textarea(lv.scr_act(),None)
6 | self.ta.set_size(200,100)
7 | self.ta.align(None,lv.ALIGN.CENTER,0,0)
8 | self.ta.set_text("A text in a Text Area")
9 | self.ta.set_event_cb(self.event_handler)
10 |
11 | def event_handler(self,source,event):
12 | if event == lv.EVENT.VALUE_CHANGED:
13 | print("i= ",self.i)
14 | print("Value:",self.ta.get_text())
15 | elif event == lv.EVENT.LONG_PRESSED_REPEAT:
16 | # For simple test: Long press the Text are to add the text below
17 | txt = "\n\nYou can scroll it if the text is long enough.\n\n"
18 | if self.i < len(txt):
19 | self.ta.add_char(ord(txt[self.i]))
20 | self.i += 1
21 |
22 | TextArea()
23 |
24 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_2.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_textarea/lv_ex_textarea_3.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tileview/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Tileview with content
5 | """""""""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_tileview/lv_ex_tileview_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tileview/lv_ex_tileview_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_tileview/lv_ex_tileview_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_win/index.rst:
--------------------------------------------------------------------------------
1 | C
2 | ^
3 |
4 | Simple window
5 | """""""""""""""""""""""
6 |
7 | .. lv_example:: lv_ex_widgets/lv_ex_win/lv_ex_win_1
8 | :language: c
9 |
10 | MicroPython
11 | ^^^^^^^^^^^
12 |
13 | No examples yet.
14 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_win/lv_ex_win_1.c:
--------------------------------------------------------------------------------
1 | #include "../../../lv_examples.h"
2 | #if LV_USE_WIN
3 |
4 | void lv_ex_win_1(void)
5 | {
6 | /*Create a window*/
7 | lv_obj_t * win = lv_win_create(lv_scr_act(), NULL);
8 | lv_win_set_title(win, "Window title"); /*Set the title*/
9 |
10 |
11 | /*Add control button to the header*/
12 | lv_obj_t * close_btn = lv_win_add_btn(win, LV_SYMBOL_CLOSE); /*Add close button and use built-in close action*/
13 | lv_obj_set_event_cb(close_btn, lv_win_close_event_cb);
14 | lv_win_add_btn(win, LV_SYMBOL_SETTINGS); /*Add a setup button*/
15 |
16 | /*Add some dummy content*/
17 | lv_obj_t * txt = lv_label_create(win, NULL);
18 | lv_label_set_text(txt, "This is the content of the window\n\n"
19 | "You can add control buttons to\n"
20 | "the window header\n\n"
21 | "The content area becomes\n"
22 | "automatically scrollable is it's \n"
23 | "large enough.\n\n"
24 | " You can scroll the content\n"
25 | "See the scroll bar on the right!");
26 | }
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_win/lv_ex_win_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_win/lv_ex_win_1.png
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_ex_widgets/lv_ex_win/lv_ex_win_1.py:
--------------------------------------------------------------------------------
1 | # create a window
2 | win = lv.win(lv.scr_act(),None)
3 | win.set_title("Window title") # Set the title
4 |
5 | win_style = lv.style_t()
6 | win_style.init()
7 | win_style.set_margin_right(lv.STATE.DEFAULT, 50)
8 | win.add_style(lv.win.PART.CONTENT_SCROLLABLE,win_style)
9 |
10 | # Add control button to the header
11 | close_btn = win.add_btn_right(lv.SYMBOL.CLOSE)
12 | close_btn.set_event_cb(lambda obj,e: lv.win.close_event_cb(lv.win.__cast__(obj), e))
13 |
14 |
15 | win.add_btn_right(lv.SYMBOL.SETTINGS) # Add a setup button
16 |
17 | # Add some dummy content
18 | txt = lv.label(win)
19 | txt.set_text(
20 | """This is the content of the window
21 |
22 | You can add control buttons to
23 | the window header
24 |
25 | The content area becomes automatically
26 | scrollable if it's large enough.
27 |
28 | You can scroll the content
29 | See the scroll bar on the bottom!"""
30 | )
31 |
32 |
--------------------------------------------------------------------------------
/components/lv_examples/lv_examples/src/lv_examples.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_examples.h
3 | * This file exists only to be compatible with Arduino's library structure
4 | */
5 |
6 | #ifndef LV_EXAMPLES_SRC_H
7 | #define LV_EXAMPLES_SRC_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | #include "../lv_examples.h"
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 |
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 |
37 | #ifdef __cplusplus
38 | } /* extern "C" */
39 | #endif
40 |
41 | #endif /*LV_EXAMPLES_SRC_H*/
42 |
--------------------------------------------------------------------------------
/components/lvgl/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{c,h}]
2 | indent_style = space
3 | indent_size = 4
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 |
--------------------------------------------------------------------------------
/components/lvgl/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | open_collective: lvgl
2 |
--------------------------------------------------------------------------------
/components/lvgl/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a bug report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 |
14 |
15 | ### Perform all steps below and tick them with [x]
16 | - [ ] Check the related part of the [Documentation](https://docs.lvgl.io/)
17 | - [ ] Update lvgl to the latest version
18 | - [ ] Reproduce the issue in a [Simulator](https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html)
19 |
20 | ### Describe the bug
21 |
24 |
25 | ### To Reproduce
26 |
34 |
35 | ### Expected behavior
36 |
39 |
40 | ### Screenshots or video
41 |
44 |
--------------------------------------------------------------------------------
/components/lvgl/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Documentation
4 | url: https://docs.lvgl.io
5 | about: Be sure to read to documentation first
6 | - name: Forum
7 | url: https://forum.lvgl.io
8 | about: For topics like How-to, Getting started, Feature request
9 | - name: CONTIBUTING.md
10 | url: https://github.com/lvgl/lvgl/blob/master/docs/CONTRIBUTING.md#faq-about-contributing
11 | about: The basic rules of contributing
12 | - name: CODING_STYLE.md
13 | url: https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md
14 | about: Quick summary of LVGL's code style
15 |
--------------------------------------------------------------------------------
/components/lvgl/.github/ISSUE_TEMPLATE/dev-discussion.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Development discussion
3 | about: Discussion strictly related to the development of the LVGL.
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
15 |
16 | ### Introduce the problem
17 |
20 |
21 | ### Examples and cases
22 |
25 |
26 | ### Suggested solution
27 |
30 |
--------------------------------------------------------------------------------
/components/lvgl/.github/auto-comment.yml:
--------------------------------------------------------------------------------
1 | # Comment to a new issue.
2 | pullRequestOpened: |
3 | Thank you for raising your pull request.
4 |
5 | To ensure that all licensing criteria is met all repositories of the LVGL project apply a process called DCO (Developer's Certificate of Origin).
6 |
7 | The text of DCO can be read here: https://developercertificate.org/
8 | For a more detailed description see the [Documentation](https://docs.lvgl.io/latest/en/html/contributing/index.html#developer-certification-of-origin-dco) site.
9 |
10 | By contributing to any repositories of the LVGL project you state that your contribution corresponds with the DCO.
11 |
12 | No further action is required if your contribution fulfills the DCO. If you are not sure about it feel free to ask us in a comment.
13 |
--------------------------------------------------------------------------------
/components/lvgl/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ### Description of the feature or fix
2 |
3 | A clear and concise description of what the bug or new feature is.
4 |
5 | ### Checkpoints
6 | - [ ] Follow the [styling guide](https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md)
7 | - [ ] Update CHANGELOG.md
8 | - [ ] Update the documentation
9 |
--------------------------------------------------------------------------------
/components/lvgl/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 21
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - architecture
8 | - pinned
9 | # Label to use when marking an issue as stale
10 | staleLabel: stale
11 | # Comment to post when marking an issue as stale. Set to `false` to disable
12 | markComment: >
13 | This issue or pull request has been automatically marked as stale because it has not had
14 | recent activity. It will be closed if no further activity occurs. Thank you
15 | for your contributions.
16 | # Comment to post when closing a stale issue. Set to `false` to disable
17 | closeComment: false
18 |
--------------------------------------------------------------------------------
/components/lvgl/.github/workflows/ccpp.yml:
--------------------------------------------------------------------------------
1 | name: C/C++ CI
2 |
3 | on:
4 | push:
5 | branches: [ master, dev ]
6 | pull_request:
7 | branches: [master, dev ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v2
16 | - uses: ammaraskar/gcc-problem-matcher@master
17 | - name: Run tests
18 | run: sudo apt-get install libpng-dev; cd tests; python ./build.py
19 |
--------------------------------------------------------------------------------
/components/lvgl/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | on:
2 | issues:
3 | types: [opened, edited]
4 |
5 | jobs:
6 | auto_close_issues:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - name: Checkout
10 | uses: actions/checkout@v1
11 | - name: Automatically close issues that don't follow the issue template
12 | uses: lucasbento/auto-close-issues@v1.0.2
13 | with:
14 | github-token: ${{ secrets.GITHUB_TOKEN }}
15 | issue-close-message: "@${issue.user.login}: hello! :wave:\n\nThis issue is being automatically closed because it does not follow the issue template." # optional property
16 | closed-issues-label: "not-template"
17 |
--------------------------------------------------------------------------------
/components/lvgl/.github/workflows/merge-to-dev.yml:
--------------------------------------------------------------------------------
1 | name: Merge master branch to dev
2 | on:
3 | push:
4 | branches:
5 | - 'master'
6 | jobs:
7 | merge-branch:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@master
11 | - name: Merge to dev branch
12 | uses: devmasx/merge-branch@v1.1.0
13 | with:
14 | type: now
15 | target_branch: 'dev'
16 | env:
17 | GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
18 |
--------------------------------------------------------------------------------
/components/lvgl/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | # Sequence of patterns matched against refs/tags
4 | tags:
5 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6 |
7 | name: Create Release
8 |
9 | jobs:
10 | build:
11 | name: Create Release
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout code
15 | uses: actions/checkout@v2
16 | - name: Create Release
17 | id: create_release
18 | uses: actions/create-release@v1
19 | env:
20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
21 | with:
22 | tag_name: ${{ github.ref }}
23 | release_name: Release ${{ github.ref }}
24 | body: |
25 | See the [CHANGELOG](https://github.com/lvgl/lvgl/blob/master/CHANGELOG.md)
26 | draft: false
27 | prerelease: false
28 |
--------------------------------------------------------------------------------
/components/lvgl/.gitignore:
--------------------------------------------------------------------------------
1 | scripts/release/__pycache__
2 | **/*.o
3 | **/*bin
4 | **/*.swp
5 | **/*.swo
6 | tags
7 | docs/api_doc
8 | scripts/cppcheck_res.txt
9 | scripts/built_in_font/lv_font_*
10 |
--------------------------------------------------------------------------------
/components/lvgl/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/.gitmodules
--------------------------------------------------------------------------------
/components/lvgl/LICENCE.txt:
--------------------------------------------------------------------------------
1 | MIT licence
2 | Copyright (c) 2020 LVGL LLC
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
--------------------------------------------------------------------------------
/components/lvgl/component.mk:
--------------------------------------------------------------------------------
1 | # ESP-IDF component file for make based commands
2 |
3 | COMPONENT_SRCDIRS := .
4 | COMPONENT_SRCDIRS += src
5 | COMPONENT_SRCDIRS += src/lv_core
6 | COMPONENT_SRCDIRS += src/lv_draw
7 | COMPONENT_SRCDIRS += src/lv_font
8 | COMPONENT_SRCDIRS += src/lv_gpu
9 | COMPONENT_SRCDIRS += src/lv_hal
10 | COMPONENT_SRCDIRS += src/lv_misc
11 | COMPONENT_SRCDIRS += src/lv_themes
12 | COMPONENT_SRCDIRS += src/lv_widgets
13 |
14 | COMPONENT_ADD_INCLUDEDIRS := .
15 | COMPONENT_ADD_INCLUDEDIRS += src
16 | COMPONENT_ADD_INCLUDEDIRS += src/lv_core
17 | COMPONENT_ADD_INCLUDEDIRS += src/lv_draw
18 | COMPONENT_ADD_INCLUDEDIRS += src/lv_font
19 | COMPONENT_ADD_INCLUDEDIRS += src/lv_gpu
20 | COMPONENT_ADD_INCLUDEDIRS += src/lv_hal
21 | COMPONENT_ADD_INCLUDEDIRS += src/lv_misc
22 | COMPONENT_ADD_INCLUDEDIRS += src/lv_themes
23 | COMPONENT_ADD_INCLUDEDIRS += src/lv_widgets
24 |
--------------------------------------------------------------------------------
/components/lvgl/docs/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to LVGL
2 |
3 | Thank you for considering contributing to LVGL.
4 |
5 | For a detailed description of contribution opportunities, please visit the [Contributing](https://docs.lvgl.io/latest/en/html/contributing/index.html) section of the documentation.
6 |
--------------------------------------------------------------------------------
/components/lvgl/examples/porting/lv_port_disp_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_port_disp_templ.h
3 | *
4 | */
5 |
6 | /*Copy this file as "lv_port_disp.h" and set this value to "1" to enable content*/
7 | #if 0
8 |
9 | #ifndef LV_PORT_DISP_TEMPL_H
10 | #define LV_PORT_DISP_TEMPL_H
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | /*********************
17 | * INCLUDES
18 | *********************/
19 | #include "lvgl/lvgl.h"
20 |
21 | /*********************
22 | * DEFINES
23 | *********************/
24 |
25 | /**********************
26 | * TYPEDEFS
27 | **********************/
28 |
29 | /**********************
30 | * GLOBAL PROTOTYPES
31 | **********************/
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 | #ifdef __cplusplus
38 | } /* extern "C" */
39 | #endif
40 |
41 | #endif /*LV_PORT_DISP_TEMPL_H*/
42 |
43 | #endif /*Disable/Enable content*/
44 |
--------------------------------------------------------------------------------
/components/lvgl/examples/porting/lv_port_fs_template.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_port_fs_templ.h
3 | *
4 | */
5 |
6 | /*Copy this file as "lv_port_fs.h" and set this value to "1" to enable content*/
7 | #if 0
8 |
9 | #ifndef LV_PORT_FS_TEMPL_H
10 | #define LV_PORT_FS_TEMPL_H
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | /*********************
17 | * INCLUDES
18 | *********************/
19 | #include "lvgl/lvgl.h"
20 |
21 | /*********************
22 | * DEFINES
23 | *********************/
24 |
25 | /**********************
26 | * TYPEDEFS
27 | **********************/
28 |
29 | /**********************
30 | * GLOBAL PROTOTYPES
31 | **********************/
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 | #ifdef __cplusplus
38 | } /* extern "C" */
39 | #endif
40 |
41 | #endif /*LV_PORT_FS_TEMPL_H*/
42 |
43 | #endif /*Disable/Enable content*/
44 |
--------------------------------------------------------------------------------
/components/lvgl/examples/porting/lv_port_indev_template.h:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * @file lv_port_indev_templ.h
4 | *
5 | */
6 |
7 | /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable content*/
8 | #if 0
9 |
10 | #ifndef LV_PORT_INDEV_TEMPL_H
11 | #define LV_PORT_INDEV_TEMPL_H
12 |
13 | #ifdef __cplusplus
14 | extern "C" {
15 | #endif
16 |
17 | /*********************
18 | * INCLUDES
19 | *********************/
20 | #include "lvgl/lvgl.h"
21 |
22 | /*********************
23 | * DEFINES
24 | *********************/
25 |
26 | /**********************
27 | * TYPEDEFS
28 | **********************/
29 |
30 | /**********************
31 | * GLOBAL PROTOTYPES
32 | **********************/
33 |
34 | /**********************
35 | * MACROS
36 | **********************/
37 |
38 | #ifdef __cplusplus
39 | } /* extern "C" */
40 | #endif
41 |
42 | #endif /*LV_PORT_INDEV_TEMPL_H*/
43 |
44 | #endif /*Disable/Enable content*/
45 |
--------------------------------------------------------------------------------
/components/lvgl/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lvgl",
3 | "version": "7.11.0",
4 | "keywords": "graphics, gui, embedded, tft, lvgl",
5 | "description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/lvgl/lvgl.git"
9 | },
10 | "build": {
11 | "includeDir": "."
12 | },
13 | "license": "MIT",
14 | "homepage": "https://lvgl.io",
15 | "frameworks": "*",
16 | "platforms": "*"
17 | }
18 |
--------------------------------------------------------------------------------
/components/lvgl/library.properties:
--------------------------------------------------------------------------------
1 | name=lvgl
2 | version=7.11.0
3 | author=kisvegabor
4 | maintainer=kisvegabor,embeddedt,pete-pjb
5 | sentence=Full-featured Graphics Library for Embedded Systems
6 | paragraph=Powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
7 | category=Display
8 | url=https://lvgl.io
9 | architectures=*
10 | includes=lvgl.h
11 |
--------------------------------------------------------------------------------
/components/lvgl/lvgl.mk:
--------------------------------------------------------------------------------
1 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core/lv_core.mk
2 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal/lv_hal.mk
3 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets/lv_widgets.mk
4 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_font/lv_font.mk
5 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc/lv_misc.mk
6 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes/lv_themes.mk
7 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw/lv_draw.mk
8 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu/lv_gpu.mk
9 |
--------------------------------------------------------------------------------
/components/lvgl/scripts/built_in_font/DejaVuSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/scripts/built_in_font/DejaVuSans.ttf
--------------------------------------------------------------------------------
/components/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff
--------------------------------------------------------------------------------
/components/lvgl/scripts/built_in_font/Montserrat-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/scripts/built_in_font/Montserrat-Medium.ttf
--------------------------------------------------------------------------------
/components/lvgl/scripts/built_in_font/SimSun.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/scripts/built_in_font/SimSun.woff
--------------------------------------------------------------------------------
/components/lvgl/scripts/code-format.sh:
--------------------------------------------------------------------------------
1 | astyle --options=code-format.cfg "../src/*.c,*.h"
2 |
--------------------------------------------------------------------------------
/components/lvgl/scripts/cppcheck_run.sh:
--------------------------------------------------------------------------------
1 | cppcheck -j8 --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force
2 |
--------------------------------------------------------------------------------
/components/lvgl/scripts/infer_run.sh:
--------------------------------------------------------------------------------
1 | # https://github.com/facebook/infer
2 | #
3 | # Install:
4 | # VERSION=0.17.0; \
5 | # curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux64-v$VERSION.tar.xz" \
6 | # | sudo tar -C /opt -xJ && \
7 | # sudoln -s "/opt/infer-linux64-v$VERSION/bin/infer" /usr/local/bin/infer
8 |
9 | infer run -- make -j8
10 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_core/lv_core.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_group.c
2 | CSRCS += lv_indev.c
3 | CSRCS += lv_disp.c
4 | CSRCS += lv_obj.c
5 | CSRCS += lv_refr.c
6 | CSRCS += lv_style.c
7 |
8 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core
9 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core
10 |
11 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_core"
12 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_draw/lv_draw.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_draw.h
3 | *
4 | */
5 |
6 | #ifndef LV_DRAW_H
7 | #define LV_DRAW_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "../lv_conf_internal.h"
17 |
18 | #include "../lv_core/lv_style.h"
19 | #include "../lv_misc/lv_txt.h"
20 | #include "lv_img_decoder.h"
21 |
22 | #include "lv_draw_rect.h"
23 | #include "lv_draw_label.h"
24 | #include "lv_draw_img.h"
25 | #include "lv_draw_line.h"
26 | #include "lv_draw_triangle.h"
27 | #include "lv_draw_arc.h"
28 | #include "lv_draw_blend.h"
29 | #include "lv_draw_mask.h"
30 |
31 | /*********************
32 | * DEFINES
33 | *********************/
34 |
35 | /**********************
36 | * TYPEDEFS
37 | **********************/
38 |
39 | /**********************
40 | * GLOBAL PROTOTYPES
41 | **********************/
42 |
43 | /**********************
44 | * GLOBAL VARIABLES
45 | **********************/
46 |
47 | /**********************
48 | * MACROS
49 | **********************/
50 |
51 | /**********************
52 | * POST INCLUDES
53 | *********************/
54 |
55 | #ifdef __cplusplus
56 | } /* extern "C" */
57 | #endif
58 |
59 | #endif /*LV_DRAW_H*/
60 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_draw/lv_draw.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_draw_mask.c
2 | CSRCS += lv_draw_blend.c
3 | CSRCS += lv_draw_rect.c
4 | CSRCS += lv_draw_label.c
5 | CSRCS += lv_draw_line.c
6 | CSRCS += lv_draw_img.c
7 | CSRCS += lv_draw_arc.c
8 | CSRCS += lv_draw_triangle.c
9 | CSRCS += lv_img_decoder.c
10 | CSRCS += lv_img_cache.c
11 | CSRCS += lv_img_buf.c
12 |
13 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw
14 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw
15 |
16 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_draw"
17 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_font/lv_font_loader.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_font_loader.h
3 | *
4 | */
5 |
6 | #ifndef LV_FONT_LOADER_H
7 | #define LV_FONT_LOADER_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 |
29 | #if LV_USE_FILESYSTEM
30 |
31 | lv_font_t * lv_font_load(const char * fontName);
32 | void lv_font_free(lv_font_t * font);
33 |
34 | #endif
35 |
36 | /**********************
37 | * MACROS
38 | **********************/
39 |
40 | #ifdef __cplusplus
41 | } /* extern "C" */
42 | #endif
43 |
44 | #endif /*LV_FONT_LOADER_H*/
45 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_gpu/lv_gpu.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_gpu_stm32_dma2d.c
2 |
3 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu
4 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu
5 |
6 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_gpu"
7 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_hal/lv_hal.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_hal.h
3 | *
4 | */
5 |
6 | #ifndef LV_HAL_H
7 | #define LV_HAL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include "lv_hal_disp.h"
17 | #include "lv_hal_indev.h"
18 | #include "lv_hal_tick.h"
19 |
20 | /*********************
21 | * DEFINES
22 | *********************/
23 |
24 | /**********************
25 | * TYPEDEFS
26 | **********************/
27 |
28 | /**********************
29 | * GLOBAL PROTOTYPES
30 | **********************/
31 |
32 | /**********************
33 | * MACROS
34 | **********************/
35 |
36 | #ifdef __cplusplus
37 | } /* extern "C" */
38 | #endif
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_hal/lv_hal.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_hal_disp.c
2 | CSRCS += lv_hal_indev.c
3 | CSRCS += lv_hal_tick.c
4 |
5 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal
6 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal
7 |
8 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_hal"
9 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_misc/lv_gc.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_gc.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | #include "lv_gc.h"
11 | #include "string.h"
12 |
13 | /*********************
14 | * DEFINES
15 | *********************/
16 |
17 | /**********************
18 | * TYPEDEFS
19 | **********************/
20 |
21 | /**********************
22 | * STATIC PROTOTYPES
23 | **********************/
24 |
25 | /**********************
26 | * STATIC VARIABLES
27 | **********************/
28 |
29 | #if(!defined(LV_ENABLE_GC)) || LV_ENABLE_GC == 0
30 | LV_ROOTS
31 | #endif /* LV_ENABLE_GC */
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 | /**********************
38 | * GLOBAL FUNCTIONS
39 | **********************/
40 |
41 | void _lv_gc_clear_roots(void)
42 | {
43 | #define LV_CLEAR_ROOT(root_type, root_name) _lv_memset_00(&LV_GC_ROOT(root_name), sizeof(LV_GC_ROOT(root_name)));
44 | LV_ITERATE_ROOTS(LV_CLEAR_ROOT)
45 | }
46 |
47 | /**********************
48 | * STATIC FUNCTIONS
49 | **********************/
50 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_misc/lv_misc.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_area.c
2 | CSRCS += lv_task.c
3 | CSRCS += lv_fs.c
4 | CSRCS += lv_anim.c
5 | CSRCS += lv_mem.c
6 | CSRCS += lv_ll.c
7 | CSRCS += lv_color.c
8 | CSRCS += lv_txt.c
9 | CSRCS += lv_txt_ap.c
10 | CSRCS += lv_math.c
11 | CSRCS += lv_log.c
12 | CSRCS += lv_gc.c
13 | CSRCS += lv_utils.c
14 | CSRCS += lv_async.c
15 | CSRCS += lv_printf.c
16 | CSRCS += lv_bidi.c
17 | CSRCS += lv_debug.c
18 |
19 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc
20 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc
21 |
22 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_misc"
23 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_misc/lv_templ.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_templ.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 |
10 | /*********************
11 | * DEFINES
12 | *********************/
13 |
14 | /**********************
15 | * TYPEDEFS
16 | **********************/
17 |
18 | /* This typedef exists purely to keep -Wpedantic happy when the file is empty. */
19 | /* It can be removed. */
20 | typedef int _keep_pedantic_happy;
21 |
22 | /**********************
23 | * STATIC PROTOTYPES
24 | **********************/
25 |
26 | /**********************
27 | * STATIC VARIABLES
28 | **********************/
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | /**********************
35 | * GLOBAL FUNCTIONS
36 | **********************/
37 |
38 | /**********************
39 | * STATIC FUNCTIONS
40 | **********************/
41 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_misc/lv_templ.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_templ.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEMPL_H
7 | #define LV_TEMPL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 |
29 | /**********************
30 | * MACROS
31 | **********************/
32 |
33 | #ifdef __cplusplus
34 | } /* extern "C" */
35 | #endif
36 |
37 | #endif /*LV_TEMPL_H*/
38 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_themes/lv_themes.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_theme.c
2 |
3 | CSRCS += lv_theme_empty.c
4 | CSRCS += lv_theme_material.c
5 | CSRCS += lv_theme_mono.c
6 | CSRCS += lv_theme_template.c
7 |
8 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes
9 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes
10 |
11 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_themes"
12 |
--------------------------------------------------------------------------------
/components/lvgl/src/lv_widgets/lv_widgets.mk:
--------------------------------------------------------------------------------
1 | CSRCS += lv_arc.c
2 | CSRCS += lv_bar.c
3 | CSRCS += lv_checkbox.c
4 | CSRCS += lv_cpicker.c
5 | CSRCS += lv_dropdown.c
6 | CSRCS += lv_keyboard.c
7 | CSRCS += lv_line.c
8 | CSRCS += lv_msgbox.c
9 | CSRCS += lv_spinner.c
10 | CSRCS += lv_roller.c
11 | CSRCS += lv_table.c
12 | CSRCS += lv_tabview.c
13 | CSRCS += lv_tileview.c
14 | CSRCS += lv_btn.c
15 | CSRCS += lv_calendar.c
16 | CSRCS += lv_chart.c
17 | CSRCS += lv_canvas.c
18 | CSRCS += lv_gauge.c
19 | CSRCS += lv_label.c
20 | CSRCS += lv_list.c
21 | CSRCS += lv_slider.c
22 | CSRCS += lv_textarea.c
23 | CSRCS += lv_spinbox.c
24 | CSRCS += lv_btnmatrix.c
25 | CSRCS += lv_cont.c
26 | CSRCS += lv_img.c
27 | CSRCS += lv_imgbtn.c
28 | CSRCS += lv_led.c
29 | CSRCS += lv_linemeter.c
30 | CSRCS += lv_page.c
31 | CSRCS += lv_switch.c
32 | CSRCS += lv_win.c
33 | CSRCS += lv_objmask.c
34 |
35 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets
36 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets
37 |
38 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/lv_widgets"
39 |
--------------------------------------------------------------------------------
/components/lvgl/src/lvgl.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lvgl.h
3 | * This file exists only to be compatible with Arduino's library structure
4 | */
5 |
6 | #ifndef LVGL_SRC_H
7 | #define LVGL_SRC_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | #include "../lvgl.h"
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 |
31 | /**********************
32 | * MACROS
33 | **********************/
34 |
35 | #ifdef __cplusplus
36 | }
37 | #endif
38 |
39 | #endif /*LVGL_SRC_H*/
40 |
--------------------------------------------------------------------------------
/components/lvgl/tests/font_1.fnt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/font_1.fnt
--------------------------------------------------------------------------------
/components/lvgl/tests/font_2.fnt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/font_2.fnt
--------------------------------------------------------------------------------
/components/lvgl/tests/font_3.fnt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/font_3.fnt
--------------------------------------------------------------------------------
/components/lvgl/tests/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/icon.png
--------------------------------------------------------------------------------
/components/lvgl/tests/icon2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/icon2.png
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_core/lv_test_core.c:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_core.c
3 | *
4 | */
5 |
6 | /*********************
7 | * INCLUDES
8 | *********************/
9 | #include "../lv_test_assert.h"
10 |
11 | #if LV_BUILD_TEST
12 | #include "lv_test_core.h"
13 | #include "lv_test_obj.h"
14 | #include "lv_test_style.h"
15 | #include "lv_test_font_loader.h"
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * STATIC PROTOTYPES
27 | **********************/
28 |
29 | /**********************
30 | * STATIC VARIABLES
31 | **********************/
32 |
33 | /**********************
34 | * MACROS
35 | **********************/
36 |
37 | /**********************
38 | * GLOBAL FUNCTIONS
39 | **********************/
40 |
41 | void lv_test_core(void)
42 | {
43 | lv_test_print("");
44 | lv_test_print("*******************");
45 | lv_test_print("Start lv_core tests");
46 | lv_test_print("*******************");
47 |
48 | lv_test_obj();
49 | lv_test_style();
50 | lv_test_font_loader();
51 | }
52 |
53 | /**********************
54 | * STATIC FUNCTIONS
55 | **********************/
56 | #endif
57 |
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_core/lv_test_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_core.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_CORE_H
7 | #define LV_TEST_CORE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_core(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_CORE_H*/
39 |
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_core/lv_test_font_loader.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_font_loader.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_FONT_LOADER_H
7 | #define LV_TEST_FONT_LOADER_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_font_loader(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_FONT_LOADER_H*/
39 |
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_core/lv_test_obj.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_obj.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_OBJ_H
7 | #define LV_TEST_OBJ_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_obj(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_OBJ_H*/
39 |
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_core/lv_test_style.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_style.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_STYLE_H
7 | #define LV_TEST_STYLE_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_style(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_STYLE_H*/
39 |
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_ref_imgs/lv_test_img32_label_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/components/lvgl/tests/lv_test_ref_imgs/lv_test_img32_label_1.png
--------------------------------------------------------------------------------
/components/lvgl/tests/lv_test_widgets/lv_test_label.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file lv_test_label.h
3 | *
4 | */
5 |
6 | #ifndef LV_TEST_LABEL_H
7 | #define LV_TEST_LABEL_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 |
17 | /*********************
18 | * DEFINES
19 | *********************/
20 |
21 | /**********************
22 | * TYPEDEFS
23 | **********************/
24 |
25 | /**********************
26 | * GLOBAL PROTOTYPES
27 | **********************/
28 | void lv_test_label(void);
29 |
30 | /**********************
31 | * MACROS
32 | **********************/
33 |
34 | #ifdef __cplusplus
35 | } /* extern "C" */
36 | #endif
37 |
38 | #endif /*LV_TEST_CONT_H*/
39 |
--------------------------------------------------------------------------------
/components/lvgl/zephyr/module.yml:
--------------------------------------------------------------------------------
1 | build:
2 | cmake: .
3 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # http://editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | indent_style = space
9 | indent_size = 4
10 | end_of_line = lf
11 | charset = utf-8
12 | trim_trailing_whitespace = true
13 | insert_final_newline = true
14 |
15 | [{*.md,*.rst}]
16 | trim_trailing_whitespace = false
17 |
18 | [{Makefile,*.mk,*.bat}]
19 | indent_style = tab
20 | indent_size = 2
21 |
22 | [{*.cmake,CMakeLists.txt}]
23 | indent_style = space
24 | indent_size = 4
25 | max_line_length = 120
26 |
27 | [{*.sh,*.yml}]
28 | indent_style = space
29 | indent_size = 2
30 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/.github/auto-comment.yml:
--------------------------------------------------------------------------------
1 | # Comment to a new issue.
2 | pullRequestOpened: |
3 | Thank you for raising your pull request.
4 |
5 | To ensure that all licensing criteria is met all repositories of the LVGL project apply a process called DCO (Developer's Certificate of Origin).
6 |
7 | The text of DCO can be read here: https://developercertificate.org/
8 | For a more detailed description see the [Documentation](https://docs.lvgl.io/latest/en/html/contributing/index.html#developer-certification-of-origin-dco) site.
9 |
10 | By contributing to any repositories of the LVGL project you state that your contribution corresponds with the DCO.
11 |
12 | No further action is required if your contribution fulfills the DCO. If you are not sure about it feel free to ask us in a comment.
13 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Object files
5 | *.o
6 | *.ko
7 | *.obj
8 | *.elf
9 |
10 | # Linker output
11 | *.ilk
12 | *.map
13 | *.exp
14 |
15 | # Precompiled Headers
16 | *.gch
17 | *.pch
18 |
19 | # Libraries
20 | *.lib
21 | *.a
22 | *.la
23 | *.lo
24 |
25 | # Shared objects (inc. Windows DLLs)
26 | *.dll
27 | *.so
28 | *.so.*
29 | *.dylib
30 |
31 | # Executables
32 | *.exe
33 | *.out
34 | *.app
35 | *.i*86
36 | *.x86_64
37 | *.hex
38 |
39 | # Debug files
40 | *.dSYM/
41 | *.su
42 | *.idb
43 | *.pdb
44 |
45 | # Kernel Module Compile Results
46 | *.mod*
47 | *.cmd
48 | .tmp_versions/
49 | modules.order
50 | Module.symvers
51 | Mkfile.old
52 | dkms.conf
53 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/Kconfig:
--------------------------------------------------------------------------------
1 | rsource "lvgl_tft/Kconfig"
2 | rsource "lvgl_touch/Kconfig"
3 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 LVGL
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/lvgl_tft/FT81x.h:
--------------------------------------------------------------------------------
1 | #ifndef FT81X_H_
2 | #define FT81X_H_
3 |
4 | #include
5 |
6 | #ifdef LV_LVGL_H_INCLUDE_SIMPLE
7 | #include "lvgl.h"
8 | #else
9 | #include "lvgl/lvgl.h"
10 | #endif
11 | #include "../lvgl_helpers.h"
12 |
13 | void FT81x_init(void);
14 |
15 | void FT81x_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map);
16 |
17 | #endif /* FT81X_H_ */
18 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/lvgl_tft/jd79653a.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file il3820.h
3 | *
4 | */
5 |
6 | #ifndef JD79653A_H
7 | #define JD79653A_H
8 |
9 | #ifdef __cplusplus
10 | extern "C"
11 | {
12 | #endif
13 |
14 | #ifdef LV_LVGL_H_INCLUDE_SIMPLE
15 | #include "lvgl.h"
16 | #else
17 | #include "lvgl/lvgl.h"
18 | #endif
19 |
20 | void jd79653a_init();
21 | void jd79653a_deep_sleep();
22 |
23 | void jd79653a_lv_set_fb_cb(struct _disp_drv_t * disp_drv, uint8_t* buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y,
24 | lv_color_t color, lv_opa_t opa);
25 | void jd79653a_lv_rounder_cb(struct _disp_drv_t * disp_drv, lv_area_t *area);
26 | void jd79653a_lv_fb_flush(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map);
27 |
28 | void jd79653a_fb_set_full_color(uint8_t color);
29 | void jd79653a_fb_full_update(uint8_t *data, size_t len);
30 |
31 |
32 | #ifdef __cplusplus
33 | } /* extern "C" */
34 | #endif
35 |
36 | #endif // JD79653A_H
37 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/lvgl_touch/FT81x.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file STMPE610.h
3 | */
4 |
5 | #ifndef FT81X_TOUCH__H
6 | #define FT81X_TOUCH__H
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 |
12 | /*********************
13 | * INCLUDES
14 | *********************/
15 |
16 | #include
17 | #include
18 | #ifdef LV_LVGL_H_INCLUDE_SIMPLE
19 | #include "lvgl.h"
20 | #else
21 | #include "lvgl/lvgl.h"
22 | #endif
23 |
24 | /*********************
25 | * DEFINES
26 | *********************/
27 |
28 | /**********************
29 | * TYPEDEFS
30 | **********************/
31 |
32 | /**********************
33 | * GLOBAL PROTOTYPES
34 | **********************/
35 | ;
36 | bool FT81x_read(lv_indev_drv_t * drv, lv_indev_data_t * data);
37 |
38 | /**********************
39 | * MACROS
40 | **********************/
41 |
42 | #ifdef __cplusplus
43 | } /* extern "C" */
44 | #endif
45 |
46 | #endif /* FT81X_TOUCH__H */
47 |
--------------------------------------------------------------------------------
/components/lvgl_esp32_drivers/lvgl_touch/tp_spi.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file tp_spi.h
3 | *
4 | */
5 |
6 | #ifndef TP_SPI_H
7 | #define TP_SPI_H
8 |
9 | #ifdef __cplusplus
10 | extern "C" {
11 | #endif
12 |
13 | /*********************
14 | * INCLUDES
15 | *********************/
16 | #include
17 | #include
18 |
19 | /*********************
20 | * DEFINES
21 | *********************/
22 |
23 | /**********************
24 | * TYPEDEFS
25 | **********************/
26 |
27 | /**********************
28 | * GLOBAL PROTOTYPES
29 | **********************/
30 | void tp_spi_add_device(spi_host_device_t host);
31 | void tp_spi_add_device_config(spi_host_device_t host, spi_device_interface_config_t *config);
32 | void tp_spi_xchg(uint8_t* data_send, uint8_t* data_recv, uint8_t byte_count);
33 | void tp_spi_write_reg(uint8_t* data, uint8_t byte_count);
34 | void tp_spi_read_reg(uint8_t reg, uint8_t* data, uint8_t byte_count);
35 |
36 | /**********************
37 | * MACROS
38 | **********************/
39 |
40 |
41 | #ifdef __cplusplus
42 | } /* extern "C" */
43 | #endif
44 |
45 | #endif /*TP_SPI_H*/
46 |
--------------------------------------------------------------------------------
/images/ESP32_DevkitV1_30_GPIO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/ESP32_DevkitV1_30_GPIO.png
--------------------------------------------------------------------------------
/images/esp_wrover_kit.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/esp_wrover_kit.jpg
--------------------------------------------------------------------------------
/images/m5stack.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/m5stack.jpg
--------------------------------------------------------------------------------
/images/m5stick.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/m5stick.jpg
--------------------------------------------------------------------------------
/images/m5stickc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/m5stickc.jpg
--------------------------------------------------------------------------------
/images/menu-component.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-component.png
--------------------------------------------------------------------------------
/images/menu-lvgl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-lvgl.png
--------------------------------------------------------------------------------
/images/menu-main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-main.png
--------------------------------------------------------------------------------
/images/menu-pins-tp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-pins-tp.png
--------------------------------------------------------------------------------
/images/menu-pins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-pins.png
--------------------------------------------------------------------------------
/images/menu-predefined-displays.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-predefined-displays.png
--------------------------------------------------------------------------------
/images/menu-predefined.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/menu-predefined.png
--------------------------------------------------------------------------------
/images/new_lvgl_options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/new_lvgl_options.png
--------------------------------------------------------------------------------
/images/new_mono.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/new_mono.jpg
--------------------------------------------------------------------------------
/images/new_photo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/new_photo.jpg
--------------------------------------------------------------------------------
/images/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/screenshot.jpg
--------------------------------------------------------------------------------
/images/sparkfun_adafruit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/sparkfun_adafruit.png
--------------------------------------------------------------------------------
/images/ssd1306_wemos_lolin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/ssd1306_wemos_lolin.jpg
--------------------------------------------------------------------------------
/images/ssd1306_wemos_lolin_configuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/ssd1306_wemos_lolin_configuration.png
--------------------------------------------------------------------------------
/images/tft_backlight_control.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_backlight_control.png
--------------------------------------------------------------------------------
/images/tft_controllers_options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_controllers_options.png
--------------------------------------------------------------------------------
/images/tft_display_controller.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_display_controller.png
--------------------------------------------------------------------------------
/images/tft_pin_assignments.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_pin_assignments.png
--------------------------------------------------------------------------------
/images/tft_predefined_board_pinouts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_predefined_board_pinouts.png
--------------------------------------------------------------------------------
/images/tft_predefined_display_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_predefined_display_config.png
--------------------------------------------------------------------------------
/images/tft_spi_bus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_spi_bus.png
--------------------------------------------------------------------------------
/images/tft_width_height.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/tft_width_height.png
--------------------------------------------------------------------------------
/images/touch_controllers_options.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/touch_controllers_options.png
--------------------------------------------------------------------------------
/images/touch_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/touch_menu.png
--------------------------------------------------------------------------------
/images/touch_pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/touch_pinout.png
--------------------------------------------------------------------------------
/images/touch_spi_bus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/touch_spi_bus.png
--------------------------------------------------------------------------------
/images/touch_touch_panel_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/touch_touch_panel_config.png
--------------------------------------------------------------------------------
/images/vscode/IMG_6019.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/IMG_6019.jpg
--------------------------------------------------------------------------------
/images/vscode/image-20210919092124499.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/image-20210919092124499.png
--------------------------------------------------------------------------------
/images/vscode/image-20210919092312209.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/image-20210919092312209.png
--------------------------------------------------------------------------------
/images/vscode/image-20210919092717028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/image-20210919092717028.png
--------------------------------------------------------------------------------
/images/vscode/image-20210919092903917.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/image-20210919092903917.png
--------------------------------------------------------------------------------
/images/vscode/image-20210919092938476.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/gaojulong/lv_port_esp32_C3/6017e58d978c14bc06cdace8c267acb7cc12e12f/images/vscode/image-20210919092938476.png
--------------------------------------------------------------------------------
/main/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | idf_component_register(SRCS main.c)
2 |
--------------------------------------------------------------------------------
/main/component.mk:
--------------------------------------------------------------------------------
1 | #
2 | # "main" pseudo-component makefile.
3 | #
4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
5 |
6 | CFLAGS+= -DLV_LVGL_H_INCLUDE_SIMPLE
7 |
--------------------------------------------------------------------------------
/scripts/code-format.cfg:
--------------------------------------------------------------------------------
1 | --style=kr
2 | --indent=spaces=4
3 | --indent-classes
4 | --indent-switches
5 | --indent-cases
6 | --indent-preproc-block
7 | --indent-preproc-define
8 | --indent-col1-comments
9 | --pad-oper
10 | --unpad-paren
11 | --align-pointer=middle
12 | --align-reference=middle
13 | --convert-tabs
14 | --max-code-length=120
15 | --break-after-logical
16 | --break-closing-braces
17 | --attach-closing-while
18 | --min-conditional-indent=0
19 | --max-continuation-indent=120
20 | --mode=c
21 | --lineend=linux
22 | --recursive
23 | --suffix=none
24 | --preserve-date
25 | --formatted
26 |
--------------------------------------------------------------------------------
/scripts/run-code-format.sh:
--------------------------------------------------------------------------------
1 | astyle --options=code-format.cfg "../main/*.c"
2 | astyle --options=code-format.cfg "../components/lvgl_esp32_drivers/*.c,*.h"
3 | astyle --options=code-format.cfg "../components/lvgl_esp32_drivers/lvgl_tft/*.c,*.h"
4 | astyle --options=code-format.cfg "../components/lvgl_esp32_drivers/lvgl_touch/*c,*.h"
5 |
--------------------------------------------------------------------------------
/workspace.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "../blink"
5 | },
6 | {
7 | "path": "."
8 | }
9 | ],
10 | "settings": {
11 | "files.associations": {
12 | "gpio_ll.h": "c"
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------