kevincoooool/esp_lcd_st7102

1.0.3

Latest
uploaded 1 day ago
KSDIY · ESP LCD ST7102 (RGB/MIPI DSI) — Kevincoooool

Readme

# esp_lcd_st7102

ST7102 液晶屏驱动组件,支持 **RGB 并行** 与 **MIPI DSI** 接口,适用于 ESP32-P4 等带 LCD 外设的芯片。

本驱动主要面向 **鱼鹰光电 4.3 寸 MIPI 触摸屏模组**(驱动 IC:ST7102,分辨率 480×800,双通道 MIPI DSI)。该模组常用于 KSDIY ESP32-P4/C5 开发板配套显示方案。

- 屏幕规格:4.3 寸 / 480×800 / MIPI DSI(2 Lane)
- 配套触摸:ST7123(由 `espressif/esp_lcd_touch_st7123` 或 `ksdiy_p4c5_bsp` 提供)
- 模组采购:[鱼鹰光电 4.3 寸触摸屏 — 淘宝](https://item.taobao.com/item.htm?id=1017729638023)

> 若需要一键完成「显示 + 触摸 + LVGL + 背光 + 电源」初始化,请直接使用 [`kevincoooool/ksdiy_p4c5_bsp`](https://components.espressif.com/components/kevincoooool/ksdiy_p4c5_bsp)。

## 功能

- ST7102 初始化命令表可自定义
- RGB / MIPI DSI 面板创建与复位
- 预置 480×480、480×800 等 DPI 时序宏(`ST7102_MIPI_*_DPI_CONFIG`)
- 兼容 **ESP-IDF 5.5.x** 与 **ESP-IDF 6.x**(DPI 配置字段按版本自动适配)
- 与 ESP-IDF `esp_lcd` 框架对接

## 依赖

- ESP-IDF >= 5.5
- `esp_lcd`

## 使用

在工程 `main/idf_component.yml` 中添加:

```yaml
dependencies:
  idf: ">=5.5"
  kevincoooool/esp_lcd_st7102: "^1.0.3"
```

代码中参考 Espressif LCD 示例,包含头文件 `esp_lcd_st7102.h`,在 `esp_lcd_panel_dev_config_t.vendor_config` 中传入 ST7102 厂商配置。MIPI 方案示例:

```c
#include "esp_lcd_st7102.h"

esp_lcd_dpi_panel_config_t dpi_config =
    ST7102_MIPI_480_800_PANEL_60HZ_DPI_CONFIG(LCD_COLOR_FMT_RGB565);

st7102_vendor_config_t vendor_config = {
    .mipi_config = {
        .dsi_bus = dsi_bus,
        .dpi_config = &dpi_config,
    },
};

esp_lcd_panel_dev_config_t panel_config = {
    .reset_gpio_num = LCD_RST_GPIO,
    .rgb_ele_order = LCD_RGB_ELEMENT_ORDER_RGB,
    .bits_per_pixel = 16,
    .vendor_config = &vendor_config,
};
```

## 本地开发(同仓库)

```yaml
  kevincoooool/esp_lcd_st7102:
    version: "^1.0.3"
    override_path: "../../components/esp_lcd_st7102"
```

## 变更记录

详见 [CHANGELOG.md](./CHANGELOG.md)。

Links

Supports all targets

To add this component to your project, run:

idf.py add-dependency "kevincoooool/esp_lcd_st7102^1.0.3"

download archive

Stats

  • Archive size
    Archive size ~ 23.09 KB
  • Downloaded in total
    Downloaded in total 383 times
  • Weekly Downloads Weekly Downloads (All Versions)
  • Downloaded this version
    This version: 0 times

Badge

kevincoooool/esp_lcd_st7102 version: 1.0.3
|