feat: 添加 LCD 显示组件 lvgl_st7735s_use,集成 SPI 显示与 LVGL 界面支持
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES wifi-connect)
|
||||
REQUIRES wifi-connect esp_lvgl_port lvgl_st7735s_use
|
||||
)
|
||||
|
||||
17
main/idf_component.yml
Normal file
17
main/idf_component.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: '>=4.1.0'
|
||||
# # Put list of dependencies here
|
||||
# # For components maintained by Espressif:
|
||||
# component: "~1.0.0"
|
||||
# # For 3rd party components:
|
||||
# username/component: ">=1.0.0,<2.0.0"
|
||||
# username2/component2:
|
||||
# version: "~1.0.0"
|
||||
# # For transient dependencies `public` flag can be set.
|
||||
# # `public` flag doesn't have an effect dependencies of the `main` component.
|
||||
# # All dependencies of `main` are public by default.
|
||||
# public: true
|
||||
espressif/esp_lvgl_port: ^2.7.2
|
||||
13
main/main.c
13
main/main.c
@@ -2,13 +2,20 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "esp_check.h"
|
||||
|
||||
#include "wifi-connect.h"
|
||||
|
||||
#include "lvgl_st7735s_use.h"
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// 初始化 Wi-Fi 配网组件,支持长按按键进入配网
|
||||
//初始化 Wi-Fi 配网组件,支持长按按键进入配网
|
||||
ESP_ERROR_CHECK(wifi_connect_init());
|
||||
printf("设备启动完成:长按按键进入配网模式,手机连接 ESP32-* 后访问 http://192.168.4.1\n");
|
||||
|
||||
// 启动 LVGL 演示程序,显示简单的界面
|
||||
ESP_ERROR_CHECK(start_lvgl_demo());
|
||||
for (;;)
|
||||
{
|
||||
|
||||
vTaskDelay(pdMS_TO_TICKS(1000));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user