Skip to content

Commit f1281a2

Browse files
author
IT: Sop.Son
committed
update
1 parent c95d7d4 commit f1281a2

File tree

105 files changed

+474
-21041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+474
-21041
lines changed

examples/platformio/platformio.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ build_flags =
1515
-DCORE_DEBUG_LEVEL=1
1616
-DLV_LVGL_H_INCLUDE_SIMPLE
1717
-I src
18-
-D VN=1
19-
-D ESP32S3=1
2018
lib_deps =
2119
https://github.com/esp-arduino-libs/ESP32_Display_Panel.git
2220
https://github.com/esp-arduino-libs/ESP32_IO_Expander.git

examples/platformio/src/ESP_Panel_Board_Custom.h

Lines changed: 369 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,74 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
16

7+
#pragma once
28

3-
#define ESP_PANEL_USE_SUPPORTED_BOARD (1) // 0/1
9+
/* Set to 1 if using a supported board */
10+
#define ESP_PANEL_USE_SUPPORTED_BOARD (0) // 0/1
411

512
#if ESP_PANEL_USE_SUPPORTED_BOARD
13+
/**
14+
* Uncomment one of the following macros to select an supported development board. If multiple macros are uncommented
15+
* at the same time, an error will be prompted during compilation.
16+
*
17+
*/
618

7-
#define BOARD_ESP32_S3_LCD_EV_BOARD_V1_5
19+
/*
20+
* Espressif Supported Boards (https://www.espressif.com/en/products/devkits):
21+
*
22+
* - ESP32-C3-LCDkit: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c3/esp32-c3-lcdkit/index.html
23+
* - ESP32-S3-Box: https://github.com/espressif/esp-box/tree/master
24+
* - ESP32-S3-Box-3: https://github.com/espressif/esp-box/tree/master
25+
* - ESP32-S3-Box-3(beta): https://github.com/espressif/esp-box/tree/c4c954888e11250423f083df0067d99e22d59fbe
26+
* - ESP32-S3-Box-Lite: https://github.com/espressif/esp-box/tree/master
27+
* - ESP32-S3-EYE: https://github.com/espressif/esp-who/blob/master/docs/en/get-started/ESP32-S3-EYE_Getting_Started_Guide.md
28+
* - ESP32-S3-Korvo-2: https://docs.espressif.com/projects/esp-adf/en/latest/design-guide/dev-boards/user-guide-esp32-s3-korvo-2.html
29+
* - ESP32-S3-LCD-EV-Board: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
30+
* - ESP32-S3-LCD-EV-Board(v1.5): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html
31+
* - ESP32-S3-LCD-EV-Board-2: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide_v1.4.html
32+
* - ESP32-S3-LCD-EV-Board-2(v1.5): https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-lcd-ev-board/user_guide.html
33+
* - ESP32-S3-USB-OTG: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/index.html
34+
*
35+
*/
36+
// #define BOARD_ESP32_C3_LCDKIT
37+
// #define BOARD_ESP32_S3_BOX
38+
// #define BOARD_ESP32_S3_BOX_3
39+
// #define BOARD_ESP32_S3_BOX_3_BETA
40+
// #define BOARD_ESP32_S3_BOX_LITE
41+
// #define BOARD_ESP32_S3_EYE
42+
// #define BOARD_ESP32_S3_KORVO_2
43+
// #define BOARD_ESP32_S3_LCD_EV_BOARD
44+
// #define BOARD_ESP32_S3_LCD_EV_BOARD_V1_5
45+
// #define BOARD_ESP32_S3_LCD_EV_BOARD_2
46+
// #define BOARD_ESP32_S3_LCD_EV_BOARD_2_V1_5
47+
// #define BOARD_ESP32_S3_USB_OTG
48+
49+
/*
50+
* Shenzhen Jingcai Intelligent Supported Boards (https://www.displaysmodule.com/):
51+
*
52+
* - ESP32-4848S040C_I_Y_3:
53+
* - https://www.displaysmodule.com/sale-41828962-experience-the-power-of-the-esp32-display-module-sku-esp32-4848s040c-i-y-3.html
54+
* - http://pan.jczn1688.com/directlink/1/ESP32%20module/4.0inch_ESP32-4848S040.zip
55+
*
56+
*/
57+
// #define BOARD_ESP32_4848S040C_I_Y_3
58+
59+
/**
60+
* Do not change the following versions, they are used to check if the configurations in this file are compatible with
61+
* the current version of `ESP_Panel_Board_Supported.h` in the library. The detailed rules are as follows:
62+
*
63+
* 1. If the major version is not consistent, then the configurations in this file are incompatible with the library
64+
* and must be replaced with the file from the library.
65+
* 2. If the minor version is not consistent, this file might be missing some new configurations, which will be set to
66+
* default values. It is recommended to replace it with the file from the library.
67+
* 3. If the patch version is not consistent, it will not affect normal functionality.
68+
*
69+
*/
70+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MAJOR 0
71+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_MINOR 1
72+
#define ESP_PANEL_BOARD_SUPPORTED_FILE_VERSION_PATCH 0
873

974
#endif

examples/platformio/src/app.cpp

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1+
12
#include <Arduino.h>
23
#include <ESP_Panel_Library.h>
34
#include <lvgl.h>
4-
#include <demos/lv_demos.h>
55
#include "lvgl_port_v8.h"
6+
7+
/**
8+
/* To use the built-in examples and demos of LVGL uncomment the includes below respectively.
9+
* You also need to copy `lvgl/examples` to `lvgl/src/examples`. Similarly for the demos `lvgl/demos` to `lvgl/src/demos`.
10+
*/
11+
// #include <demos/lv_demos.h>
12+
// #include <examples/lv_examples.h>
13+
614
void setup()
715
{
16+
String title = "LVGL porting example";
17+
818
Serial.begin(115200);
19+
Serial.println(title + " start");
920

1021
Serial.println("Initialize panel device");
1122
ESP_Panel *panel = new ESP_Panel();
@@ -16,7 +27,6 @@ void setup()
1627
rgb_bus->configRgbFrameBufferNumber(LVGL_PORT_DISP_BUFFER_NUM);
1728
rgb_bus->configRgbBounceBufferSize(LVGL_PORT_RGB_BOUNCE_BUFFER_SIZE);
1829
#endif
19-
2030
panel->begin();
2131

2232
Serial.println("Initialize LVGL");
@@ -26,13 +36,35 @@ void setup()
2636
/* Lock the mutex due to the LVGL APIs are not thread-safe */
2737
lvgl_port_lock(-1);
2838

29-
lv_demo_music();
39+
/* Create a simple label */
40+
lv_obj_t *label = lv_label_create(lv_scr_act());
41+
lv_label_set_text(label, title.c_str());
42+
lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);
43+
44+
/**
45+
* Try an example. Don't forget to uncomment header.
46+
* See all the examples online: https://docs.lvgl.io/master/examples.html
47+
* source codes: https://github.com/lvgl/lvgl/tree/e7f88efa5853128bf871dde335c0ca8da9eb7731/examples
48+
*/
49+
// lv_example_btn_1();
50+
51+
/**
52+
* Or try out a demo.
53+
* Don't forget to uncomment header and enable the demos in `lv_conf.h`. E.g. `LV_USE_DEMOS_WIDGETS`
54+
*/
55+
// lv_demo_widgets();
56+
// lv_demo_benchmark();
57+
// lv_demo_music();
58+
// lv_demo_stress();
59+
3060
/* Release the mutex */
3161
lvgl_port_unlock();
62+
63+
Serial.println(title + " end");
3264
}
3365

3466
void loop()
3567
{
36-
37-
delay(0x10);
38-
}
68+
Serial.println("IDLE loop");
69+
delay(1000);
70+
}

examples/platformio/src/demos/README.md

Lines changed: 0 additions & 97 deletions
This file was deleted.

examples/platformio/src/demos/lv_demos.h

Lines changed: 0 additions & 58 deletions
This file was deleted.

examples/platformio/src/demos/lv_demos.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/platformio/src/demos/music/README.md

Lines changed: 0 additions & 27 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)