7 | English
8 |
9 |
10 | 1. Clone this repository: `git clone xxxx`.
11 | 2. The `lv_100ask_app` directory should be next to the `lvgl` directory in your project.
12 |
13 | Similarly to `lv_conf.h` there is a configuration file for the examples too. It is called `lv_100ask_app_conf.h`.
14 | 1. Copy `lv_100ask_app/lv_100ask_app_conf_template.h` next to `lv_100ask_app` directory
15 | 2. Rename it to `lv_100ask_app_conf.h`
16 | 3. Change the first `#if 0` to `#if 1` to enable the file's content
17 | 4. Enable or Disable demos
18 |
19 |
20 |
21 |
22 | 1. 将此仓库克隆下来: `git clone xxxx`.
23 | 2. 克隆下来之后将`lv_100ask_app` 目录放在你的项目中的 `lvgl` 库目录的旁边。
24 |
25 | 与 `lv_conf.h` 类似,此仓库示例也有一个配置文件。它就是`lv_demo_conf.h`。
26 | 1. 将 `lv_100ask_apps/lv_100ask_app_conf_template.h` 复制到 `lv_100ask_app` 目录旁边
27 | 2. 将 `lv_100ask_app_conf_template.h` 重命名为 `lv_100ask_app_conf.h`
28 | 3. 将重命名之后的 `lv_100ask_app_conf.h` 中的第一个 `#if 0` 更改为 `#if 1` 以启用文件的内容
29 | 4. 启用或禁用具体示例
30 |
31 |
32 | # 公司简介
33 |
34 | 深圳百问网科技有限公司(百问网)是中国一个专注于嵌入式Linux培训视频的科技公司。
35 |
36 | 致力于提供“教材、答疑、开发板、仿真器”一站式嵌入式学习解决方案:
37 |
38 | - 嵌入式教育开拓者
39 | - 18年嵌入式专家
40 | - ST官方合作伙伴
41 | - 全志在线官方合作伙伴
42 | - 中兴通信资深BSP专家
43 | - 首批华为鸿蒙课程开发者
44 | - 鸿蒙Liteos-a教程提供者
45 | - RT-Thread深度合作伙伴
46 | - RT-Thread官方教程提供者
47 |
48 | # 联系方式
49 |
50 | - 百问网官网:[http://www.100ask.net](http://www.100ask.net/)
51 | - 百问网官方wiki:[http://wiki.100ask.org](http://wiki.100ask.org/)
52 | - 百问网官方论坛:[http://bbs.100ask.net](http://bbs.100ask.net/)
53 | - 微信公众号:百问科技
54 | - CSDN:https://edu.csdn.net/lecturer/90
55 | - B站:https://space.bilibili.com/275908810?from=search&seid=10505231074028238949
56 | - 知乎:https://www.zhihu.com/people/www.100ask/
57 | - 微博:https://weibo.com/888wds?topnav=1&wvr=6
58 | - 电子发烧友学院:http://t.elecfans.com/teacher/3.html
59 | - 淘宝: [https://100ask.taobao.com](https://100ask.taobao.com/)
60 | - 技术支持邮箱: [weidongshan@qq.com](mailto:weidongshan@qq.com)
61 | - 公司名称:深圳百问网科技有限公司
62 | - 电话: 0755-86200561
63 | - 地 址: 广东省深圳市龙岗区布吉南湾街道平吉大道建昇大厦B1505
64 | - 邮 编: 518114
65 |
--------------------------------------------------------------------------------
/lv_lib_png/README.md:
--------------------------------------------------------------------------------
1 | # PNG decoder for LVGL
2 |
3 | **This repository is merged into the lvgl repository. See https://docs.lvgl.io/master/libs/png.html**
4 |
5 | Allow the use of PNG images in LVGL. This implementation uses [lodepng](https://github.com/lvandeve/lodepng) library.
6 |
7 | ## Get started
8 | - Download or clone this repository
9 | - [Download from GitHub](https://github.com/littlevgl/lv_lib_lodepng/archive/master.zip)
10 | - Clone: `git clone https://github.com/littlevgl/lv_lib_png.git`
11 | - Include the library: `#include "lv_lib_png/lv_png.h"`
12 | - Initalize the decocer with `lv_png_init()`
13 | - Test with the following code:
14 | ```c
15 | LV_IMG_DECLARE(png_decoder_test);
16 | lv_obj_t * img = lv_img_create(lv_scr_act());
17 | lv_img_set_src(img, &png_decoder_test);
18 | ```
19 |
20 | ## Use PNG images from file
21 | By deafult `lodepng` uses C file IO API (e.g. `fopen`) and images can be opened like this:
22 | ```c
23 | lv_img_set_src(img, "./lv_lib_png/png_decoder_test.png");
24 | ```
25 |
26 | If you want to make `lodepng` to use LVGL's file system API add `#define LV_PNG_USE_LV_FILESYSTEM 1` to the end of your`lv_conf.h`.
27 | In this case you need to [register a driver](https://docs.lvgl.io/latest/en/html/overview/file-system.html) fo LVGL. The following functions are required:
28 | - `open_cb()`
29 | - `read_cb()`
30 | - `close_cb()`
31 | - `size_cb()`
32 |
33 | After that fiels can be opened like this:
34 | ```c
35 | lv_img_set_src(img, "P:lv_lib_lodepng/png_decoder_test.png");
36 | ```
37 |
38 |
39 | Note that the path of the file might be different.
40 |
41 | ## Use PNG images from flash
42 | To store a PNG image in flash it needs to be converted to C array with [Online Image converter](https://lvgl.io/tools/imageconverter). Choose `Raw with alpha` Color format and `C array` Output format. Copy the result C array to your project and use it like this:
43 | ```c
44 | LV_IMG_DECLARE(my_test_img);
45 | lv_obj_t * img = lv_img_create(lv_scr_act(), NULL);
46 | lv_img_set_src(img, &my_test_img);
47 | ```
48 |
49 | ## Learn more
50 | To learn more about the PNG decoder itself read [this blog post](https://blog.littlevgl.com/2018-10-05/png_converter)
51 |
52 | To learn more about the Image decoder interface of LittlevGL read the realevant part of the [documentation](https://docs.littlevgl.com/en/html/overview/image.html#image-decoder).
53 |
--------------------------------------------------------------------------------
/lv_100ask_app/src/imx6ull_app/imx6ull_set_lan/main.c:
--------------------------------------------------------------------------------
1 | #include