Fix Core 3 compilation

This commit is contained in:
Theo Arends 2023-08-23 15:10:14 +02:00
parent db6193dc80
commit 3c725a13d6
1 changed files with 6 additions and 4 deletions

View File

@ -6,15 +6,14 @@
#include <Wire.h> #include <Wire.h>
#include <SPI.h> #include <SPI.h>
#ifdef ESP32 #ifdef ESP32
#ifdef CONFIG_IDF_TARGET_ESP32S3 #ifdef CONFIG_IDF_TARGET_ESP32S3
#define USE_ESP32_S3 #define USE_ESP32_S3
#endif #endif
#endif
#ifdef ESP32
#include "driver/spi_master.h" #include "driver/spi_master.h"
#if ESP_IDF_VERSION_MAJOR >= 5
#include "soc/gpio_periph.h"
#endif // ESP_IDF_VERSION_MAJOR >= 5
#endif #endif
#ifdef USE_ESP32_S3 #ifdef USE_ESP32_S3
@ -89,6 +88,7 @@ enum uColorType { uCOLOR_BW, uCOLOR_COLOR };
#undef GPIO_CLR #undef GPIO_CLR
#undef GPIO_SET_SLOW #undef GPIO_SET_SLOW
#undef GPIO_CLR_SLOW #undef GPIO_CLR_SLOW
#if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6 #if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C6
#define GPIO_CLR(A) GPIO.out_w1tc.val = (1 << A) #define GPIO_CLR(A) GPIO.out_w1tc.val = (1 << A)
#define GPIO_SET(A) GPIO.out_w1ts.val = (1 << A) #define GPIO_SET(A) GPIO.out_w1ts.val = (1 << A)
@ -96,6 +96,8 @@ enum uColorType { uCOLOR_BW, uCOLOR_COLOR };
#define GPIO_CLR(A) GPIO.out_w1tc = (1 << A) #define GPIO_CLR(A) GPIO.out_w1tc = (1 << A)
#define GPIO_SET(A) GPIO.out_w1ts = (1 << A) #define GPIO_SET(A) GPIO.out_w1ts = (1 << A)
#endif #endif
#define GPIO_CLR_SLOW(A) digitalWrite(A, LOW) #define GPIO_CLR_SLOW(A) digitalWrite(A, LOW)
#define GPIO_SET_SLOW(A) digitalWrite(A, HIGH) #define GPIO_SET_SLOW(A) digitalWrite(A, HIGH)