42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
#ifndef _DZBJ_GPIO_H_
|
||
#define _DZBJ_GPIO_H_
|
||
|
||
// dzbj LCD/Touch GPIO 定义(从 dzbj 项目移植)
|
||
// 注意:I2C_MASTER_NUM 改为 I2C_NUM_1,与主项目共享总线
|
||
|
||
// 触摸功能开关(0=禁用,1=启用)
|
||
// 本项目不使用触摸屏功能,禁用以节约资源(I2C 触摸控制器初始化、GPIO、LVGL 输入驱动、内存)
|
||
#define DZBJ_ENABLE_TOUCH 1
|
||
|
||
#include "esp_lvgl_port.h"
|
||
|
||
#define PIN_NUM_SCL 18 // I2C SCL
|
||
#define PIN_NUM_SDA 17 // I2C SDA
|
||
#define I2C_MASTER_FREQ_HZ 100000
|
||
#define I2C_MASTER_NUM I2C_NUM_1 // 改为 I2C_NUM_1,与主项目音频编解码器共享
|
||
|
||
// LCD QSPI 引脚
|
||
#define PIN_LCD_EN 1 // 背光使能(PWM)
|
||
#define PIN_LCD_D0 11 // 数据0
|
||
#define PIN_LCD_D1 13 // 数据1
|
||
#define PIN_LCD_D2 14 // 数据2
|
||
#define PIN_LCD_D3 21 // 数据3
|
||
#define PIN_LCD_CLK 12 // 时钟
|
||
#define PIN_LCD_CS 47 // 片选
|
||
#define PIN_LCD_RST 7 // 复位
|
||
|
||
#define LCD_HIGH 360
|
||
#define LCD_WID 360
|
||
|
||
// 触摸引脚
|
||
#define PIN_TP_RST 6 // 触摸复位
|
||
#define PIN_TP_INT 5 // 触摸中断
|
||
|
||
#define LCD_TAG "LCD"
|
||
#define SPI_LCD_HOST SPI2_HOST
|
||
|
||
#define PIN_MOTOR_EN -1 // 电机使能(未使用)
|
||
#define PIN_BAT_ADC 3 // 电池ADC检测引脚
|
||
|
||
#endif // _DZBJ_GPIO_H_
|