mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2025-05-17 23:28:09 +08:00
fix esp32 lcd show bug: Pin conflict (#339)
This commit is contained in:
@ -35,12 +35,18 @@
|
||||
#define BUILTIN_LED_GPIO GPIO_NUM_2
|
||||
|
||||
|
||||
#ifdef CONFIG_LCD_ST7789_240X240_7PIN
|
||||
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_22
|
||||
#define DISPLAY_CS_PIN GPIO_NUM_NC
|
||||
#else
|
||||
#define DISPLAY_CS_PIN GPIO_NUM_22
|
||||
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_23
|
||||
#endif
|
||||
|
||||
#define DISPLAY_MOSI_PIN GPIO_NUM_4
|
||||
#define DISPLAY_CLK_PIN GPIO_NUM_15
|
||||
#define DISPLAY_DC_PIN GPIO_NUM_21
|
||||
#define DISPLAY_RST_PIN GPIO_NUM_18
|
||||
#define DISPLAY_CS_PIN GPIO_NUM_NC
|
||||
|
||||
|
||||
#ifdef CONFIG_LCD_ST7789_240X320
|
||||
|
@ -12,7 +12,11 @@ namespace iot {
|
||||
// 这里仅定义 Lamp 的属性和方法,不包含具体的实现
|
||||
class Lamp : public Thing {
|
||||
private:
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
gpio_num_t gpio_num_ = GPIO_NUM_35;
|
||||
#else
|
||||
gpio_num_t gpio_num_ = GPIO_NUM_18;
|
||||
#endif
|
||||
bool power_ = false;
|
||||
|
||||
void InitializeGpio() {
|
||||
|
Reference in New Issue
Block a user