initial commit

This commit is contained in:
Mikkeli Matlock
2026-02-15 02:48:59 +09:00
commit 19db125619
258 changed files with 345581 additions and 0 deletions

4
main/CMakeLists.txt Normal file
View File

@@ -0,0 +1,4 @@
idf_component_register(
SRCS "main.cpp"
INCLUDE_DIRS "./")

19
main/idf_component.yml Normal file
View File

@@ -0,0 +1,19 @@
## 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
lvgl/lvgl: ^8.4.0
espressif/avi_player: ^1.0.0
espressif/esp_new_jpeg: ^0.6.1

39
main/main.cpp Normal file
View File

@@ -0,0 +1,39 @@
#include <stdio.h>
#include <freertos/FreeRTOS.h>
#include <esp_timer.h>
#include <esp_log.h>
#include "display_bsp.h"
#include "lvgl_bsp.h"
#include "user_app.h"
DisplayPort RlcdPort(12,11,5,40,41,400,300);
static void Lvgl_FlushCallback(lv_disp_drv_t *drv, const lv_area_t *area, lv_color_t *color_map)
{
uint16_t *buffer = (uint16_t *)color_map;
for(int y = area->y1; y <= area->y2; y++)
{
for(int x = area->x1; x <= area->x2; x++)
{
uint8_t color = (*buffer < 0x7fff) ? ColorBlack : ColorWhite;
RlcdPort.RLCD_SetPixel(x, y, color);
buffer++;
}
}
RlcdPort.RLCD_Display();
lv_disp_flush_ready(drv);
}
extern "C" void app_main(void)
{
UserApp_AppInit();
RlcdPort.RLCD_Init();
Lvgl_PortInit(400,300,Lvgl_FlushCallback);
if(Lvgl_lock(-1)) {
UserApp_UiInit();
Lvgl_unlock();
}
UserApp_TaskInit();
}

7
main/main_wifi_sta.c Normal file
View File

@@ -0,0 +1,7 @@
#include <stdio.h>
#include "user_app.h"
void app_main(void)
{
user_top_init();
}

20
main/user_config.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef USER_CONFIG_H
#define USER_CONFIG_H
/*lcd init*/
#define LCD_WIDTH 300 //需要注意的是,竖屏和横屏显示的时候,分辨率不一样的
#define LCD_HEIGHT 400 //需要注意的是,竖屏和横屏显示的时候,分辨率不一样的
#define RLCD_DC_PIN GPIO_NUM_5
#define RLCD_CS_PIN GPIO_NUM_40
#define RLCD_SCK_PIN GPIO_NUM_11
#define RLCD_MOSI_PIN GPIO_NUM_12
#define RLCD_RST_PIN GPIO_NUM_41
#define RLCD_TE_PIN GPIO_NUM_6
/*i2c*/
#define ESP32_I2C_SDA_PIN GPIO_NUM_13
#define ESP32_I2C_SCL_PIN GPIO_NUM_14
#endif