From 1e99e9a9ce5603f96039fd4d0b6b71e4b11f44f0 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Thu, 13 Jul 2023 09:14:05 +0200 Subject: [PATCH] boards/esp32s3-usb-otg: update for st77xx driver --- boards/esp32s3-usb-otg/Makefile.dep | 4 ---- boards/esp32s3-usb-otg/board.c | 2 +- boards/esp32s3-usb-otg/include/board.h | 20 ++++++++++---------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/boards/esp32s3-usb-otg/Makefile.dep b/boards/esp32s3-usb-otg/Makefile.dep index c9a81e5189..b2e1972370 100644 --- a/boards/esp32s3-usb-otg/Makefile.dep +++ b/boards/esp32s3-usb-otg/Makefile.dep @@ -26,7 +26,3 @@ endif ifneq (,$(filter disp_dev,$(USEMODULE))) USEMODULE += st7789 endif - -ifneq (,$(filter st7735,$(USEMODULE))) - USEMODULE += st7789 -endif diff --git a/boards/esp32s3-usb-otg/board.c b/boards/esp32s3-usb-otg/board.c index c4331a7a5d..295788175c 100644 --- a/boards/esp32s3-usb-otg/board.c +++ b/boards/esp32s3-usb-otg/board.c @@ -20,7 +20,7 @@ void board_init(void) { -#if MODULE_ST7735 +#if MODULE_ST77XX gpio_init(LCD_BACKLIGHT, GPIO_OUT); #endif } diff --git a/boards/esp32s3-usb-otg/include/board.h b/boards/esp32s3-usb-otg/include/board.h index de81aa75fc..2ab1747506 100644 --- a/boards/esp32s3-usb-otg/include/board.h +++ b/boards/esp32s3-usb-otg/include/board.h @@ -147,21 +147,21 @@ * This configuration cannot be changed. * @{ */ -#if MODULE_ST7735 +#if MODULE_ST77XX #define LCD_DC GPIO4 /**< LCD DC signal */ #define LCD_CS GPIO5 /**< LCD EN signal */ #define LCD_RST GPIO8 /**< LCD RST signal */ #define LCD_BACKLIGHT GPIO9 /**< LCD BL signal */ -#define ST7735_PARAM_SPI SPI_DEV(0) -#define ST7735_PARAM_CS LCD_CS -#define ST7735_PARAM_DCX LCD_DC -#define ST7735_PARAM_RST LCD_RST -#define ST7735_PARAM_NUM_LINES 240 -#define ST7735_PARAM_RGB_CHANNELS 240 -#define ST7735_PARAM_ROTATION LCD_MADCTL_MV | LCD_MADCTL_MX | LCD_MADCTL_MY -#define ST7735_PARAM_INVERTED 1 -#define ST7735_PARAM_RGB 1 +#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789 +#define ST77XX_PARAM_CS LCD_CS +#define ST77XX_PARAM_DCX LCD_DC +#define ST77XX_PARAM_RST LCD_RST +#define ST77XX_PARAM_NUM_LINES 240 +#define ST77XX_PARAM_RGB_CHANNELS 240 +#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_VERT +#define ST77XX_PARAM_INVERTED 1 +#define ST77XX_PARAM_RGB 1 #define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT) #define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)