Baji_Rtc_Toy_Key/main/dzbj/dzbj_gpio.h
Rdzleo dbdd304905 代码初始化:
本项目为触摸版项目代码复制而来,基于此版本进行按键功能的适配!
2026-03-23 11:14:56 +08:00

42 lines
1.3 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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_