mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 02:37:01 +08:00
Update README.md
This commit is contained in:
committed by
GitHub
parent
9f2f89163f
commit
84d44b2487
@@ -4,14 +4,16 @@
|
||||

|
||||

|
||||

|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
**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.**
|
||||
|
||||
[Website](https://littlevgl.com) · [Live demo](https://littlevgl.com/live-demo) · [Simulator](https://docs.littlevgl.com/#PC-simulator) · [Docs](https://docs.littlevgl.com/) · [Blog](https://blog.littlevgl.com/)
|
||||
:star: **Star the project if you like it!** :star:
|
||||
|
||||
**[Website](https://littlevgl.com) · [Live demo](https://littlevgl.com/live-demo) · [Simulator](https://docs.littlevgl.com/#PC-simulator) · [Docs](https://docs.littlevgl.com/) · [Blog](https://blog.littlevgl.com/)**
|
||||
|
||||
:star: Star the project if you like it! :star:
|
||||
|
||||
### Features
|
||||
* **Powerful building blocks** buttons, charts, lists, sliders, images, etc.
|
||||
@@ -28,44 +30,56 @@
|
||||
* **Tutorials, examples, themes** for rapid development
|
||||
* **Documentation** and API references online
|
||||
|
||||
### Porting
|
||||
In the simplest case you need 5 things:
|
||||
### Supported devices
|
||||
Basically, every device which is capable of driving a display is suitable to run LittlevGL. The minimal requirements:
|
||||
- 16, 32 or 64-bit microcontroller or processor
|
||||
- < 16 MHz clock speed
|
||||
- 8 kB RAM for static data and >2 KB RAM for dynamic data (graphical objects)
|
||||
- 64 kB program memory (flash)
|
||||
- Optionally ~1/10 screen sized memory for internal buffering (at 240 × 320, 16-bit colors it means 15 kB)
|
||||
|
||||
Just to mention a few platforms:
|
||||
- STM32F1, STM32F3, [STM32F4](https://blog.littlevgl.com/2017-07-15/stm32f429_disco_port), [STM32F7]()
|
||||
- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
|
||||
- NXP Kinetis, LPC, iMX
|
||||
- [Linux frame buffer](https://blog.littlevgl.com/2018-01-03/linux_fb) (/dev/fb)
|
||||
- [Raspberry PI](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
|
||||
- Espressif [ESP32](https://github.com/littlevgl/esp32_ili9431)
|
||||
- Nordic nrf52
|
||||
- Quectell M66
|
||||
|
||||
### Quick start in a simulator
|
||||
Try LittlevGL in a simulator on you PC without any embedded hardware. Choose a project with your favourite IDE:
|
||||
|
||||
| Eclipse | CodeBlock | Visual Studio | PlatfomIO | Qt Creator |
|
||||
|-------------|----------- |---------------|-----------|------------|
|
||||
| [](https://github.com/littlevgl/pc_simulator_sdl_eclipse) | [](https://github.com/littlevgl/pc_simulator_win_codeblocks) | [](https://github.com/littlevgl/visual_studio_2017_sdl_x64) | [](https://github.com/littlevgl/pc_simulator_sdl_platformio) | [](https://blog.littlevgl.com/2019-01-03/qt-creator) |
|
||||
| Cross-platform<br>with SDL | Native Windows | Cross-platform<br>with SDL | Cross-platform<br>with SDL | Cross-platform<br>with SDL |
|
||||
|
||||
### Porting to an embedded hardware
|
||||
In the most simple case you need to do 5 things:
|
||||
1. Call `lv_tick_inc(x)` every `x` milliseconds in a Timer or Task (`x` should be between 1 and 10)
|
||||
2. Register a function which can **copy a pixel array** to an area of the screen.
|
||||
3. Register a function which can **read an input device**. (E.g. touch pad)
|
||||
4. Copy `lv_conf_templ.h` as `lv_conf.h` and set at least `LV_HOR_RES`, `LV_VER_RES` and `LV_COLOR_DEPTH`.
|
||||
4. Copy `lv_conf_templ.h` as `lv_conf.h` next to `lvgl` and set at least `LV_HOR_RES`, `LV_VER_RES` and `LV_COLOR_DEPTH`.
|
||||
5. Call `lv_task_handler()` periodically every few milliseconds.
|
||||
For a detailed description visit https://docs.littlevgl.com/#Porting
|
||||
Or check the [Porting tutorial](https://github.com/littlevgl/lv_examples/blob/master/lv_tutorial/0_porting/lv_tutorial_porting.c)
|
||||
|
||||
### Project set-up
|
||||
1. **Clone** or [Download](https://littlevgl.com/download) the lvgl repository: `git clone https://github.com/littlevgl/lvgl.git`
|
||||
2. **Create project** with your preferred IDE and add the *lvgl* folder
|
||||
3. Copy **lvgl/lv_conf_templ.h** as **lv_conf.h** next to the *lvgl* folder
|
||||
4. In the lv_conf.h delete the first `#if 0` and its `#endif`. Leave the default configuration for the first try.
|
||||
5. In your *main.c*: #include "lvgl/lvgl.h"
|
||||
6. In your *main function*:
|
||||
* lvgl_init();
|
||||
* tick, display and input device initialization (see above)
|
||||
7. To **test** create a label: `lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);`
|
||||
8. In the main *while(1)* call `lv_task_handler();` and make a few milliseconds delay (e.g. `my_delay_ms(5);`)
|
||||
9. Compile the code and load it to your embedded hardware
|
||||
### Contributing
|
||||
To ask questions and discuss topics we use [GitHub's Issue tracker](https://github.com/littlevgl/lvgl/issues).
|
||||
You contribute in several ways:
|
||||
- **Answer other's question** click the Watch button on the top to get notified about the issues
|
||||
- **Report and/or fix bugs** using the issue tracker in Pull-request
|
||||
- **Suggest and/or implement new features** using the issue tracker in Pull-request
|
||||
- **Improve and/or translate the documentation** learn more [here](https://github.com/littlevgl/docs)
|
||||
- **Write a blog post about your experiences** learn more [here](https://github.com/littlevgl/blog)
|
||||
- **Upload your project or product as a reference** to [this site](https://blog.littlevgl.com/2018-12-26/references)
|
||||
|
||||
### PC Simulator
|
||||
You can test the graphics library in a PC simulator, if you don't have an embedded hardware. The simulator uses [SDL2](https://www.libsdl.org/) library to emulate a display on your monitor and a touch pad with your mouse.
|
||||
Before contributing, please read [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md).
|
||||
For more info read this [blog post](https://blog.littlevgl.com/2018-12-06/contributing).
|
||||
|
||||
There is a pre-configured PC project for **Eclipse CDT** in this repository: https://github.com/littlevgl/pc_simulator
|
||||
|
||||
### Related repositories
|
||||
* PC simulator: https://github.com/littlevgl/pc_simulator
|
||||
* Projects: https://github.com/littlevgl/lv_projects
|
||||
* Examples: https://github.com/littlevgl/lv_examples
|
||||
* Drivers: https://github.com/littlevgl/lv_drivers
|
||||
|
||||
## Contributing
|
||||
See [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md)
|
||||
|
||||
## Donate
|
||||
If you are pleased with this graphics library, found it useful, or are happy with the support you got, please help its further development:
|
||||
### Donate
|
||||
If you are pleased with the library, found it useful, or you are happy with the support you got, please help its further development:
|
||||
|
||||
[](https://littlevgl.com/donate)
|
||||
|
||||
Reference in New Issue
Block a user