From e18895a4c94274ae9712b9cd97dd443e805d6977 Mon Sep 17 00:00:00 2001 From: Tester23 Date: Wed, 4 Dec 2024 22:40:32 +0100 Subject: [PATCH] Update drv_st7735.c --- src/driver/drv_st7735.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver/drv_st7735.c b/src/driver/drv_st7735.c index 2b1ea9772..65d724c07 100644 --- a/src/driver/drv_st7735.c +++ b/src/driver/drv_st7735.c @@ -34,6 +34,7 @@ as well as Adafruit raw 1.8" TFT display #include "drv_st7735.h" #ifdef PLATFORM_ESPIDF #include "driver/gpio.h" +#include "soc/gpio_reg.h.h" #endif @@ -285,9 +286,10 @@ Bcmd[] = { // Initialization commands for 7735B screens #define digitalPinToPort(pin) (0) #if WINDOWS #define portOutputRegister(port) (0) -#else +#elif PLATFORM_ESPIDF #define portOutputRegister(port) ((volatile uint32_t *)GPIO_OUT_REG) - +#else +#define portOutputRegister(port) (0) #endif #define digitalPinToBitMask(pin) (1UL << (pin))