forked from xiaozhi/xiaozhi-esp32
fix esp32 lcd show bug: Pin conflict (#339)
This commit is contained in:
@@ -35,12 +35,18 @@
|
|||||||
#define BUILTIN_LED_GPIO GPIO_NUM_2
|
#define BUILTIN_LED_GPIO GPIO_NUM_2
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef CONFIG_LCD_ST7789_240X240_7PIN
|
||||||
#define DISPLAY_BACKLIGHT_PIN GPIO_NUM_22
|
#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_MOSI_PIN GPIO_NUM_4
|
||||||
#define DISPLAY_CLK_PIN GPIO_NUM_15
|
#define DISPLAY_CLK_PIN GPIO_NUM_15
|
||||||
#define DISPLAY_DC_PIN GPIO_NUM_21
|
#define DISPLAY_DC_PIN GPIO_NUM_21
|
||||||
#define DISPLAY_RST_PIN GPIO_NUM_18
|
#define DISPLAY_RST_PIN GPIO_NUM_18
|
||||||
#define DISPLAY_CS_PIN GPIO_NUM_NC
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_LCD_ST7789_240X320
|
#ifdef CONFIG_LCD_ST7789_240X320
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ namespace iot {
|
|||||||
// 这里仅定义 Lamp 的属性和方法,不包含具体的实现
|
// 这里仅定义 Lamp 的属性和方法,不包含具体的实现
|
||||||
class Lamp : public Thing {
|
class Lamp : public Thing {
|
||||||
private:
|
private:
|
||||||
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
|
gpio_num_t gpio_num_ = GPIO_NUM_35;
|
||||||
|
#else
|
||||||
gpio_num_t gpio_num_ = GPIO_NUM_18;
|
gpio_num_t gpio_num_ = GPIO_NUM_18;
|
||||||
|
#endif
|
||||||
bool power_ = false;
|
bool power_ = false;
|
||||||
|
|
||||||
void InitializeGpio() {
|
void InitializeGpio() {
|
||||||
|
|||||||
Reference in New Issue
Block a user