

GitHub - littlevgl/lvgl: Full-featured embedded GUI library with animation, opac...
source link: https://github.com/littlevgl/lvgl
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
Littlev Graphics Libraray
LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
Homepage: https://littlevgl.com
Table Of Content
Key features
- Powerful building blocks buttons, charts, lists, sliders, images etc
- Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
- Various input devices touch pad, mouse, keyboard, encoder, buttons etc
- Multi language support with UTF-8 decoding
- Fully customizable graphical elements
- Hardware independent to use with any microcontroller or display
- Scalable to operate with few memory (50 kB Flash, 10 kB RAM)
- OS, External memory and GPU supported but not required
- Single frame buffer operation even with advances graphical effects
- Written in C for maximal compatibility
- Simulator to develop on PC without embedded hardware
- Tutorials, examples, themes for rapid development
- Documentation and API references online
Porting
In the most sime case you need 4 things:
- Call
lv_tick_inc(1)
in every millisecods in a Timer or Task - Register a function which can copy a pixel array to an area of the screen.
- Register a function which can read an input device. (E.g. touch pad)
- Call
lv_task_handler()
periodically in every few milliseconds For more information visit https://littlevgl.com/porting Or check the Porting tutorial
Project set-up
- Clone or Download the lvgl repository:
git clone https://github.com/littlevgl/lvgl.git
- Create project with your prefered IDE and add the lvgl folder
- Copy lvgl/lv_conf_templ.h as lv_conf.h next to the lvgl folder
- In the lv_conf.h delete the first
#if 0
and its#endif
. Let the default configurations at first. - In your main.c: #include "lvgl/lvgl.h"
- In your main function:
- lvgl_init();
- tick, display and input device initialization (see above)
- To test create a label:
lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);
- In the main while(1) call
lv_task_handler();
and make a few milliseconds delay (e.g.my_delay_ms(5);
) - Compile the code and load it to your embedded hardware
PC Simulator
If you don't have got an embedded hardware you can test the graphics library in a PC simulator. The simulator uses SDL2 to emulate a display on your monitor and a touch pad with your mouse.
There is a pre-configured PC project for Eclipse CDT in this repository: https://github.com/littlevgl/pc_simulator
Screenshots
Contributing
See CONTRIBUTING.md
Donate
If you are pleased with the graphics library, found it useful or be happy with the support you got, please help its further development:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK