chore(style): remove the trailing space from all source files (#3188)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/arduino.md
|
||||
```
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
The [LVGL library](https://github.com/lvgl/lvgl) is directly available as Arduino libraries.
|
||||
|
||||
Note that you need to choose a board powerful enough to run LVGL and your GUI. See the [requirements of LVGL](https://docs.lvgl.io/master/intro/index.html#requirements).
|
||||
Note that you need to choose a board powerful enough to run LVGL and your GUI. See the [requirements of LVGL](https://docs.lvgl.io/master/intro/index.html#requirements).
|
||||
|
||||
For example ESP32 is a good candidate to create UI's with LVGL.
|
||||
|
||||
@@ -15,13 +15,13 @@ For example ESP32 is a good candidate to create UI's with LVGL.
|
||||
|
||||
LVGL can be installed via the Arduino IDE Library Manager or as a .ZIP library.
|
||||
|
||||
You can [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of LVGL from GitHub and simply copy it to Arduino's library folder.
|
||||
You can [Download](https://github.com/lvgl/lvgl/archive/refs/heads/master.zip) the latest version of LVGL from GitHub and simply copy it to Arduino's library folder.
|
||||
|
||||
## Set up drivers
|
||||
|
||||
To get started it's recommended to use [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library as a TFT driver to simplify testing.
|
||||
To get started it's recommended to use [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) library as a TFT driver to simplify testing.
|
||||
To make it work, setup `TFT_eSPI` according to your TFT display type via editing either
|
||||
- `User_Setup.h`
|
||||
- `User_Setup.h`
|
||||
- or by selecting a configuration in the `User_Setup_Select.h`
|
||||
|
||||
Both files are located in `TFT_eSPI` library's folder.
|
||||
@@ -61,8 +61,8 @@ Due to some the limitations of Arduino's build system you need to copy `lvgl/exa
|
||||
|
||||
## Debugging and logging
|
||||
|
||||
LVGL can display debug information in case of trouble.
|
||||
In the `LVGL_Arduino.ino` example there is a `my_print` method, which sends this debug information to the serial interface.
|
||||
LVGL can display debug information in case of trouble.
|
||||
In the `LVGL_Arduino.ino` example there is a `my_print` method, which sends this debug information to the serial interface.
|
||||
To enable this feature you have to edit the `lv_conf.h` file and enable logging in the section `log settings`:
|
||||
|
||||
```c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/cmake.md
|
||||
```
|
||||
|
||||
@@ -46,14 +46,14 @@ This configuration declares a dependency between the two targets **MyFirmware**
|
||||
|
||||
### Additional CMake options
|
||||
Besides `LV_CONF_PATH` there are two additional CMake options to specify include paths.
|
||||
|
||||
`LV_LVGL_H_INCLUDE_SIMPLE` which specifies whether to `#include "lvgl.h"` absolut or relative
|
||||
|
||||
`LV_LVGL_H_INCLUDE_SIMPLE` which specifies whether to `#include "lvgl.h"` absolut or relative
|
||||
|
||||
| ON (default) | OFF |
|
||||
| ------------ | -------------- |
|
||||
| "lvgl.h" | "../../lvgl.h" |
|
||||
|
||||
`LV_CONF_INCLUDE_SIMPLE` which specifies whether to `#include "lv_conf.h"` and `"lv_drv_conf.h"` absolut or relative
|
||||
`LV_CONF_INCLUDE_SIMPLE` which specifies whether to `#include "lv_conf.h"` and `"lv_drv_conf.h"` absolut or relative
|
||||
|
||||
| ON (default) | OFF |
|
||||
| --------------- | --------------------- |
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/espressif.md
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/index.md
|
||||
```
|
||||
# Platforms
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platoforms/simulator.md
|
||||
```
|
||||
# Simulator on PC
|
||||
@@ -9,7 +9,7 @@ You can try out LVGL **using only your PC** (i.e. without any development boards
|
||||
|
||||
Using the simulator on a PC has the following advantages:
|
||||
- Hardware independent - Write code, run it on the PC and see the result on a monitor.
|
||||
- Cross-platform - Any Windows, Linux or macOS system can run the PC simulator.
|
||||
- Cross-platform - Any Windows, Linux or macOS system can run the PC simulator.
|
||||
- Portability - The written code is portable, which means you can simply copy it when migrating to embedded hardware.
|
||||
- Easy Validation - The simulator is also very useful to report bugs because it provides a common platform for every user. So it's a good idea to reproduce a bug in the simulator and use that code snippet in the [Forum](https://forum.lvgl.io).
|
||||
|
||||
@@ -34,7 +34,7 @@ The following section describes the set-up guide of Eclipse CDT in more detail.
|
||||
|
||||
[Eclipse CDT](https://eclipse.org/cdt/) is a C/C++ IDE.
|
||||
|
||||
Eclipse is a Java-based tool so be sure **Java Runtime Environment** is installed on your system.
|
||||
Eclipse is a Java-based tool so be sure **Java Runtime Environment** is installed on your system.
|
||||
|
||||
On Debian-based distros (e.g. Ubuntu): `sudo apt-get install default-jre`
|
||||
|
||||
@@ -45,7 +45,7 @@ You can download Eclipse's CDT from: [https://www.eclipse.org/cdt/downloads.php]
|
||||
|
||||
### Install SDL 2
|
||||
|
||||
The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross-platform library to simulate a TFT display and a touchpad.
|
||||
The PC simulator uses the [SDL 2](https://www.libsdl.org/download-2.0.php) cross-platform library to simulate a TFT display and a touchpad.
|
||||
|
||||
#### Linux
|
||||
On **Linux** you can easily install SDL2 using a terminal:
|
||||
@@ -58,14 +58,14 @@ On **Linux** you can easily install SDL2 using a terminal:
|
||||
#### Windows
|
||||
If you are using **Windows** firstly you need to install MinGW ([64 bit version](http://mingw-w64.org/doku.php/download)). After installing MinGW, do the following steps to add SDL2:
|
||||
|
||||
1. Download the development libraries of SDL.
|
||||
1. Download the development libraries of SDL.
|
||||
Go to [https://www.libsdl.org/download-2.0.php](https://www.libsdl.org/download-2.0.php) and download _Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz_
|
||||
2. Decompress the file and go to _x86_64-w64-mingw32_ directory (for 64 bit MinGW) or to _i686-w64-mingw32_ (for 32 bit MinGW)
|
||||
3. Copy _..._mingw32/include/SDL2_ folder to _C:/MinGW/.../x86_64-w64-mingw32/include_
|
||||
4. Copy _..._mingw32/lib/_ content to _C:/MinGW/.../x86_64-w64-mingw32/lib_
|
||||
5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_workspace}/pc_simulator/Debug/_. Do it later when Eclipse is installed.
|
||||
5. Copy _..._mingw32/bin/SDL2.dll_ to _{eclipse_workspace}/pc_simulator/Debug/_. Do it later when Eclipse is installed.
|
||||
|
||||
Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.
|
||||
Note: If you are using **Microsoft Visual Studio** instead of Eclipse then you don't have to install MinGW.
|
||||
|
||||
#### OSX
|
||||
On **OSX** you can easily install SDL2 with brew: `brew install sdl2`
|
||||
@@ -74,9 +74,9 @@ If something is not working, then please refer [this tutorial](http://lazyfoo.ne
|
||||
|
||||
### Pre-configured project
|
||||
|
||||
A pre-configured graphics library project (based on the latest release) is always available to get started easily.
|
||||
A pre-configured graphics library project (based on the latest release) is always available to get started easily.
|
||||
You can find the latest one on [GitHub](https://github.com/lvgl/lv_sim_eclipse_sdl).
|
||||
(Please note that, the project is configured for Eclipse CDT).
|
||||
(Please note that, the project is configured for Eclipse CDT).
|
||||
|
||||
### Add the pre-configured project to Eclipse CDT
|
||||
|
||||
@@ -86,7 +86,7 @@ Close the start-up window and go to **File->Import** and choose **General->
|
||||
|
||||
On **Windows** you have to do two additional things:
|
||||
|
||||
- Copy the **SDL2.dll** into the project's Debug folder
|
||||
- Copy the **SDL2.dll** into the project's Debug folder
|
||||
- Right-click on the project -> Project properties -> C/C++ Build -> Settings -> Libraries -> Add ... and add _mingw32_ above SDLmain and SDL. (The order is important: mingw32, SDLmain, SDL)
|
||||
|
||||
### Compile and Run
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/stm32.md
|
||||
```
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
```eval_rst
|
||||
.. include:: /header.rst
|
||||
.. include:: /header.rst
|
||||
:github_url: |github_link_base|/get-started/platforms/tasmota-berry.md
|
||||
```
|
||||
# Tasmota and berry
|
||||
@@ -39,10 +39,10 @@ Versions supported: LVGL v8.0.2, LodePNG v20201017, Freetype 2.10.4
|
||||
|
||||
### Tasmota + Berry + LVGL could be used for:
|
||||
|
||||
- Fast prototyping GUI.
|
||||
- Fast prototyping GUI.
|
||||
- Shortening the cycle of changing and fine-tuning the GUI.
|
||||
- Modelling the GUI in a more abstract way by defining reusable composite objects, taking advantage of Berry's language features such as Inheritance, Closures, Exception Handling...
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
- Make LVGL accessible to a larger audience. No need to know C to create a nice GUI on an embedded system.
|
||||
|
||||
A higher level interface compatible with [OpenHASP](https://github.com/HASwitchPlate/openHASP) is also under development.
|
||||
|
||||
@@ -53,7 +53,7 @@ A higher level interface compatible with [OpenHASP](https://github.com/HASwitchP
|
||||
> TL;DR:
|
||||
> Similar to MicroPython, it's very much like the C API, but Object-Oriented for LVGL components.
|
||||
|
||||
Let's dive right into an example!
|
||||
Let's dive right into an example!
|
||||
|
||||
### A simple example
|
||||
|
||||
|
||||
Reference in New Issue
Block a user