<h1 align="center"> LittlevGL - Open-source Embedded GUI Library</h1>
<p align="center">
<a href="https://github.com/littlevgl/lvgl/blob/master/LICENCE.txt"><img src="https://img.shields.io/badge/licence-MIT-blue.svg"></a>
<a href="https://github.com/littlevgl/lvgl/releases/tag/v6.0"><img src="https://img.shields.io/badge/version-6.0-blue.svg"></a>
</p>
<p align="center">
<img src="https://littlevgl.com/github/cover_ori_reduced_2.gif">
</p>
<p align="center">
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.
</p>
<h4 align="center">
<a href="https://littlevgl.com">Website </a> ·
<a href="https://littlevgl.com/live-demo">Live demo</a> ·
<a href="https://docs.littlevgl.com/en/html/get-started/pc-simulator.html">Simulator</a> ·
<a href="https://forum.littlevgl.com">Forum</a> ·
<a href="https://docs.littlevgl.com/">Docs</a> ·
<a href="https://blog.littlevgl.com/">Blog</a>
</h4>
---
- [Features](#features)
- [Supported devices](#supported-devices)
- [Quick start in a simulator](#quick-start-in-a-simulator)
- [Add LittlevGL to your project](#add-littlevgl-to-your-project)
- [Learn the basics](#learn-the-basics)
- [Examples](#examples)
- [Contributing](#contributing)
- [Donate](#donate)
## Features
* **Powerful building blocks** buttons, charts, lists, sliders, images, etc.
* **Advanced graphics** with animations, anti-aliasing, opacity, smooth scrolling
* **Simultaneously use various input devices** touchscreen, mouse, keyboard, encoder, buttons, etc.
* **Simultaneously use multiple displays** i.e. monochrome and color display
* **Multi-language support** with UTF-8 encoding
* **Fully customizable** graphical elements
* **Hardware independent** to use with any microcontroller or display
* **Scalable** to operate with little memory (64 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
* **Micropython Binding** exposes [LittlevGL API in Micropython](https://blog.littlevgl.com/2019-02-20/micropython-bindings)
* **Simulator** to develop on PC without embedded hardware
* **Tutorials, examples, themes** for rapid development
* **Documentation** and API references
## Supported devices
Basically, every modern controller - which is able to drive a display - is suitable to run LittlevGL. The minimal requirements:
- 16, 32 or 64 bit microcontroller or processor
- > 16 MHz clock speed is recommended
- Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)
- RAM:
- Static RAM usage: ~8..16 kB depending on the used features and objects types
- Stack: > 2kB (> 4 kB is recommended)
- Dynamic data (heap): > 4 KB (> 16 kB is recommended if using several objects).
Set by `LV_MEM_SIZE` in *lv_conf.h*.
- Display buffer: > *"Horizontal resolution"* pixels (> 10 × *"Horizontal resolution"* is recommended)
- C99 or newer compiler
*Note that the memory usage might vary depending on the architecture, compiler and build options.*
Just to mention some **platforms**:
- STM32F1, STM32F3, [STM32F4](https://blog.littlevgl.com/2017-07-15/stm32f429_disco_port), [STM32F7](https://github.com/littlevgl/stm32f746_disco_no_os_sw4stm32)
- 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
The easiest way to get started with LittlevGL is to run it in a simulator on your PC without any embedded hardware.
Choose a project with your favourite IDE:
| Eclipse | CodeBlocks | Visual Studio | PlatformIO | Qt Creator |
|-------------|-------------|---------------|-----------|------------|
| [![Eclipse](https://littlevgl.com/logo/ide/eclipse.jpg)](https://github.com/littlevgl/pc_simulator_sdl_eclipse) | [![CodeBlocks](https://littlevgl.com/logo/ide/codeblocks.jpg)](https://github.com/littlevgl/pc_simulator_win_codeblocks) | [![VisualStudio](https://littlevgl.com/logo/ide/visualstudio.jpg)](https://github.com/littlevgl/visual_studio_2017_sdl_x64) | [![PlatformIO](https://littlevgl.com/logo/ide/platformio.jpg)](https://github.com/littlevgl/pc_simulator_sdl_platformio) | [![QtCreator](https://littlevgl.com/logo/ide/qtcreator.jpg)](https://blog.littlevgl.com/2019-01-03/qt-creator) |
| Cross-platform<br>with SDL<br>(Recommended on<br>Linux and Mac) | Native Windows | Windows<br>with SDL | Cross-platform<br>with SDL | Cross-platform<br>with SDL |
## Add LittlevGL to your project
The steps below show how to setup LittlevGL on an embedded system with a display and a touchpad.
You can use the [Simulators](https://docs.littlevgl.com/en/html/get-started/pc-simulator) to get ready to use projects which can be run on your PC.
1. [Download](https://littlevgl.com/download) or [Clone](https://github.com/littlevgl/lvgl) the library
2. Copy the `lvgl` folder into your project
3. Copy `lvgl/lv_conf_template.h` as `lv_conf.h` next to the `lvgl` folder and set at least `LV_HOR_RES_MAX`, `LV_VER_RES_MAX` and `LV_COLOR_DEPTH`.
4. Include `lvgl/lvgl.h` where you need to use LittlevGL related functions.
5. Call `lv_tick_inc(x)` every `x` milliseconds **in a Timer or Task** (`x` should be between 1 and 10). It is required for the internal timing of LittlevGL.
6. Call `lv_init()`
7. Create a display buffer for LittlevGL
```c
static lv_disp_buf_t disp_buf;
static lv_color_t buf[LV_HOR_RES_MAX * 10]; /*Declare a buffer for 10 lines*/
lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
```
8. Implement and register a function which can **copy a pixel array** to an area of your display:
```c
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
disp_drv.buffer = &disp_buf; /*Assign the buffer to the display*/
lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
void my_disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p)
{
int32_t x, y;
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
set_pixel(x, y, *color_p); /* Put a pixel to the display.*/
color_p++;
}
}
lv_disp_flush_ready(disp); /* Indicate you are ready with the flushing*/
}
```
9. Implement and register a function which can **read an input device**. E.g. for a touch pad:
```c
lv_indev_drv_init(&indev_drv); /*Descriptor of a input device driver*/
indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/
indev_drv.read_cb = my_touchpad_read; /*Set your driver function*/
lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data)
{
static lv_coord_t last_x = 0;
static lv_coord_t last_y = 0;
/*Save the state and save the pressed coordinate*/
data->state = touchpad_is_pressed() ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
if(data->state == LV_INDEV_STATE_PR) touchpad_get_xy(&last_x, &last_y);
/*Set the coordinates (if released use the last pressed coordinates)*/
data->point.x = last_x;
data->point.y = last_y;
return false; /*Return `false` because we are not buffering and no more data to read*/
}
```
10. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, i
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
基于STM32F411单片机+MPU6050+BMP180 智能手表WatchX硬件(原理图+PCB)+设计软件源代码,AD09设计的工程文件,硬件采用2层板设计,大小为41*28mm,包括ALTIUM设计的硬件原理图PCB工程文件及软件源码,可做为你的学习设计参考。 硬件主要器件如下: Library Component Count : 17 BMP180 数字气压传感器 Diode Default Diode IPS-LCD-1.14 IPS-LCD-1.14寸裸屏spi接口 Inductor Iron 2 LED MICRO USB 5PIN MPU-6050 Pad Res STM32F411CEU6 TP4056 TPS63020 Triode-NPN
资源推荐
资源详情
资源评论
收起资源包目录
基于STM32F411单片机+MPU6050+BMP180 智能手表WatchX硬件(原理图+PCB)+设计软件源代码.zip (1552个子文件)
cstart_thumb2.asm 3KB
astyle_c 169B
astyle_h 33B
WatchX.uvguix.ASUS 99KB
WatchX.axf 2.82MB
KeilClear.bat 395B
blue_flower_32.bin 29KB
blue_flower_16.bin 15KB
blue_flower_16_swap.bin 15KB
blue_flower_8.bin 7KB
blue_rose_16.bin 3KB
flower_icon_alpha.bin 1KB
img_bubble_pattern.c 5.79MB
ImgSettings.c 2.23MB
ImgPage1.c 2.23MB
ImgBg.c 2.23MB
red_flower.c 397KB
ImgWatchX.c 382KB
imgbtn_img_4.c 339KB
imgbtn_img_3.c 339KB
ImgStopWatch.c 241KB
imgbtn_img_2.c 212KB
imgbtn_img_1.c 212KB
ImgTimeCfg.c 207KB
lv_font_roboto_28.c 205KB
ImgShadowDown.c 198KB
ImgShadowUp.c 198KB
ImgLight.c 187KB
ImgButterfly.c 172KB
ImgVIFEXTech.c 161KB
ImgInfo.c 157KB
ImgTrigger.c 149KB
lv_font_roboto_12_subpx.c 148KB
lv_font_roboto_22.c 140KB
ImgMountain.c 137KB
arial_20.c 136KB
benchmark_bg.c 133KB
stm32f4xx_rcc.c 131KB
EuroStar_26.c 130KB
stm32f4xx_tim.c 119KB
lv_font_roboto_28_compressed.c 105KB
stm32f4xx_rtc.c 98KB
HandGotn_26.c 88KB
lv_font_roboto_16.c 88KB
Morganite_36.c 88KB
img_flower_icon.c 86KB
stm32f4xx_dfsdm.c 83KB
lv_obj.c 71KB
stm32f4xx_adc.c 66KB
apple_icon_alpha.c 65KB
lv_ta.c 64KB
lv_font_roboto_12.c 64KB
stm32f4xx_can.c 63KB
stm32f4xx_flash.c 61KB
lv_draw_rect.c 60KB
HandGotn_20.c 60KB
stm32f4xx_fmc.c 60KB
stm32f4xx_dsi.c 59KB
system_stm32f4xx.c 58KB
system_stm32f4xx.c 58KB
stm32f4xx_usart.c 55KB
stm32f4xx_fmpi2c.c 55KB
stm32f4xx_cryp_aes.c 55KB
lv_chart.c 52KB
stm32f4xx_i2c.c 52KB
stm32f4xx_dma.c 50KB
stm32f4xx_spi.c 50KB
apple_icon_chroma.c 49KB
lv_page.c 48KB
stm32f4xx_sai.c 47KB
lv_label.c 47KB
lv_indev.c 46KB
EuroStar_60.c 46KB
stm32f4xx_fsmc.c 44KB
lv_tabview.c 43KB
stm32f4xx_pwr.c 41KB
lv_btnm.c 40KB
HandGotn_14.c 39KB
system_stm32f4xx.c 38KB
stm32f4xx_ltdc.c 38KB
Morganite_100.c 37KB
lv_calendar.c 37KB
stm32f4xx_sdio.c 37KB
ImgRun.c 37KB
lv_ddlist.c 36KB
lv_list.c 36KB
stm32f4xx_cryp.c 34KB
lv_cpicker.c 33KB
stm32f4xx_lptim.c 33KB
stm32f4xx_qspi.c 31KB
lv_table.c 30KB
lv_theme_alien.c 30KB
lv_draw_basic.c 29KB
lv_canvas.c 29KB
cm_backtrace.c 29KB
lv_theme_nemo.c 28KB
lv_txt.c 28KB
lv_theme_material.c 28KB
lv_roller.c 27KB
lv_theme_night.c 26KB
共 1552 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
GJZGRB
- 粉丝: 1617
- 资源: 6428
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功