Skip to content

Commit

Permalink
Eliminate compiler warning moononournation#45
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation authored and xidameng committed Jun 28, 2022
1 parent 96e7d51 commit e3d2069
Show file tree
Hide file tree
Showing 27 changed files with 55 additions and 55 deletions.
10 changes: 5 additions & 5 deletions examples/PDQgraphicstest/PDQgraphicstest.ino
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, GFX_NOT_DEFINED /* RST */, 0 /* rotat
#define TFT_DC 27
#define TFT_RST 26
#define TFT_BL 28
#elif CONFIG_IDF_TARGET_ESP32
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)
#define TFT_CS 5 // GFX_NOT_DEFINED for display without CS pin
#define TFT_DC 27 // GFX_NOT_DEFINED for display without DC pin (9-bit SPI)
#define TFT_RST 33
#define TFT_BL 22
#elif CONFIG_IDF_TARGET_ESP32S2
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
#define TFT_CS 34 // GFX_NOT_DEFINED for display without CS pin
#define TFT_DC 26
#define TFT_RST 33
#define TFT_BL 21
#elif CONFIG_IDF_TARGET_ESP32C3
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32C3)
#define TFT_CS 7 // GFX_NOT_DEFINED for display without CS pin
#define TFT_DC 2
#define TFT_RST 1
Expand Down Expand Up @@ -144,9 +144,9 @@ Arduino_GFX *gfx = new Arduino_ST7789(bus, GFX_NOT_DEFINED /* RST */, 0 /* rotat
Arduino_DataBus *bus = new Arduino_NRFXSPI(TFT_DC, TFT_CS, 13 /* SCK */, 11 /* MOSI */, 12 /* MISO */);
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
Arduino_DataBus *bus = new Arduino_RPiPicoSPI(TFT_DC, TFT_CS, PIN_SPI0_SCK /* SCK */, PIN_SPI0_MOSI /* MOSI */, PIN_SPI0_MISO /* MISO */, spi0 /* spi */);
#elif CONFIG_IDF_TARGET_ESP32
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)
Arduino_DataBus *bus = new Arduino_ESP32SPI(TFT_DC, TFT_CS, 18 /* SCK */, 23 /* MOSI */, GFX_NOT_DEFINED /* MISO */, VSPI /* spi_num */);
#elif CONFIG_IDF_TARGET_ESP32S2
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
Arduino_DataBus *bus = new Arduino_ESP32SPI(TFT_DC, TFT_CS, 36 /* SCK */, 35 /* MOSI */, 37 /* MISO */, HSPI /* spi_num */);
#elif defined(ESP8266)
Arduino_DataBus *bus = new Arduino_ESP8266SPI(TFT_DC, TFT_CS);
Expand Down
2 changes: 1 addition & 1 deletion src/Arduino_GFX_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Arduino_DataBus *create_default_Arduino_DataBus()
return new Arduino_NRFXSPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO);
#elif defined(ARDUINO_RASPBERRY_PI_PICO)
return new Arduino_RPiPicoSPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO, spi0);
#elif CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32) // ESP32/PICO-D4
return new Arduino_ESP32SPI(DF_GFX_DC, DF_GFX_CS, DF_GFX_SCK, DF_GFX_MOSI, DF_GFX_MISO);
#elif defined(ESP8266)
return new Arduino_ESP8266SPI(DF_GFX_DC, DF_GFX_CS);
Expand Down
6 changes: 3 additions & 3 deletions src/Arduino_GFX_Library.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,23 @@
#define DF_GFX_DC 27
#define DF_GFX_RST 26
#define DF_GFX_BL 28
#elif CONFIG_IDF_TARGET_ESP32
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)
#define DF_GFX_SCK 18
#define DF_GFX_MOSI 23
#define DF_GFX_MISO GFX_NOT_DEFINED
#define DF_GFX_CS 5
#define DF_GFX_DC 27
#define DF_GFX_RST 33
#define DF_GFX_BL 22
#elif CONFIG_IDF_TARGET_ESP32S2
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
#define DF_GFX_SCK 36
#define DF_GFX_MOSI 35
#define DF_GFX_MISO GFX_NOT_DEFINED
#define DF_GFX_CS 34
#define DF_GFX_DC 26
#define DF_GFX_RST 33
#define DF_GFX_BL 21
#elif CONFIG_IDF_TARGET_ESP32C3
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32C3)
#define DF_GFX_CS 7
#define DF_GFX_DC 2
#define DF_GFX_RST 1
Expand Down
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32I2S8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_ESP32I2S8.h"

#if CONFIG_IDF_TARGET_ESP32
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)

#include "soc/dport_reg.h"

Expand Down Expand Up @@ -329,4 +329,4 @@ INLINE void Arduino_ESP32I2S8::CS_LOW(void)
}
}

#endif // #if CONFIG_IDF_TARGET_ESP32
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32I2S8.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_DataBus.h"

#if CONFIG_IDF_TARGET_ESP32
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)

#ifndef _ARDUINO_ESP32I2S8_H_
#define _ARDUINO_ESP32I2S8_H_
Expand Down Expand Up @@ -65,4 +65,4 @@ class Arduino_ESP32I2S8 : public Arduino_DataBus

#endif // _ARDUINO_ESP32I2S8_H_

#endif // #if CONFIG_IDF_TARGET_ESP32
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32PAR16.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR16::Arduino_ESP32PAR16(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -377,4 +377,4 @@ INLINE void Arduino_ESP32PAR16::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR16_H_
#define _ARDUINO_ESP32PAR16_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR16 : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR16_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16Q.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32PAR16Q.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR16Q::Arduino_ESP32PAR16Q(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -374,4 +374,4 @@ INLINE void Arduino_ESP32PAR16Q::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16Q.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR16Q_H_
#define _ARDUINO_ESP32PAR16Q_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR16Q : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR16Q_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16QQ.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32PAR16QQ.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR16QQ::Arduino_ESP32PAR16QQ(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -369,4 +369,4 @@ INLINE void Arduino_ESP32PAR16QQ::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR16QQ.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR16QQ_H_
#define _ARDUINO_ESP32PAR16QQ_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR16QQ : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR16QQ_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_ESP32PAR8.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR8::Arduino_ESP32PAR8(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -345,4 +345,4 @@ INLINE void Arduino_ESP32PAR8::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR8_H_
#define _ARDUINO_ESP32PAR8_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR8 : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR8_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8Q.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_ESP32PAR8Q.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR8Q::Arduino_ESP32PAR8Q(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -342,4 +342,4 @@ INLINE void Arduino_ESP32PAR8Q::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8Q.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR8Q_H_
#define _ARDUINO_ESP32PAR8Q_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR8Q : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR8Q_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8QQ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_ESP32PAR8QQ.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32PAR8QQ::Arduino_ESP32PAR8QQ(
int8_t dc, int8_t cs, int8_t wr, int8_t rd,
Expand Down Expand Up @@ -338,4 +338,4 @@ INLINE void Arduino_ESP32PAR8QQ::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32PAR8QQ.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32PAR8QQ_H_
#define _ARDUINO_ESP32PAR8QQ_H_
Expand Down Expand Up @@ -71,4 +71,4 @@ class Arduino_ESP32PAR8QQ : public Arduino_DataBus

#endif // _ARDUINO_ESP32PAR8QQ_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR16.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32S2PAR16.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32S2PAR16::Arduino_ESP32S2PAR16(int8_t dc, int8_t cs, int8_t wr, int8_t rd)
: _dc(dc), _cs(cs), _wr(wr), _rd(rd)
Expand Down Expand Up @@ -298,4 +298,4 @@ INLINE void Arduino_ESP32S2PAR16::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR16.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32S2PAR16_H_
#define _ARDUINO_ESP32S2PAR16_H_
Expand Down Expand Up @@ -63,4 +63,4 @@ class Arduino_ESP32S2PAR16 : public Arduino_DataBus

#endif // _ARDUINO_ESP32S2PAR16_H_

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR16Q.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32S2PAR16Q.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32S2PAR16Q::Arduino_ESP32S2PAR16Q(int8_t dc, int8_t cs, int8_t wr, int8_t rd)
: _dc(dc), _cs(cs), _wr(wr), _rd(rd)
Expand Down Expand Up @@ -293,4 +293,4 @@ INLINE void Arduino_ESP32S2PAR16Q::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR16Q.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32S2PAR16Q_H_
#define _ARDUINO_ESP32S2PAR16Q_H_
Expand Down Expand Up @@ -63,4 +63,4 @@ class Arduino_ESP32S2PAR16Q : public Arduino_DataBus

#endif // _ARDUINO_ESP32S2PAR16Q_H_

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR8.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_ESP32S2PAR8.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

Arduino_ESP32S2PAR8::Arduino_ESP32S2PAR8(int8_t dc, int8_t cs, int8_t wr, int8_t rd)
: _dc(dc), _cs(cs), _wr(wr), _rd(rd)
Expand Down Expand Up @@ -297,4 +297,4 @@ INLINE void Arduino_ESP32S2PAR8::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32S2PAR8.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Arduino_DataBus.h"

#if CONFIG_IDF_TARGET_ESP32S2
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32S2PAR8_H_
#define _ARDUINO_ESP32S2PAR8_H_
Expand Down Expand Up @@ -62,4 +62,4 @@ class Arduino_ESP32S2PAR8 : public Arduino_DataBus

#endif // _ARDUINO_ESP32S2PAR8_H_

#endif // #if CONFIG_IDF_TARGET_ESP32S2
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_ESP32SPI.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#define WAIT_SPI_NOT_BUSY while (_spi->dev->cmd.usr)

Expand Down Expand Up @@ -1049,4 +1049,4 @@ INLINE void Arduino_ESP32SPI::CS_LOW(void)
*_csPortClr = _csPinMask;
}

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
4 changes: 2 additions & 2 deletions src/databus/Arduino_ESP32SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
#include "Arduino_DataBus.h"

#if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)

#ifndef _ARDUINO_ESP32SPI_H_
#define _ARDUINO_ESP32SPI_H_
Expand Down Expand Up @@ -94,4 +94,4 @@ class Arduino_ESP32SPI : public Arduino_DataBus

#endif // _ARDUINO_ESP32SPI_H_

#endif // #if (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2)
2 changes: 1 addition & 1 deletion src/databus/Arduino_HWSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void Arduino_HWSPI::begin(int32_t speed, int8_t dataMode)
_csPortClr = (PORTreg_t)_dcPortClr;
_csPinMask = 0;
}
#elif CONFIG_IDF_TARGET_ESP32C3
#elif defined(ESP32) && (CONFIG_IDF_TARGET_ESP32C3)
_dcPinMask = digitalPinToBitMask(_dc);
_dcPortSet = (PORTreg_t)&GPIO.out_w1ts;
_dcPortClr = (PORTreg_t)&GPIO.out_w1tc;
Expand Down
Loading

0 comments on commit e3d2069

Please sign in to comment.