Skip to content

Commit e9b8637

Browse files
committed
Fix compiler warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
1 parent b53849e commit e9b8637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Adafruit_SPITFT.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) {
560560
if (
561561
#if !defined(SPI_INTERFACES_COUNT)
562562
1
563-
#endif
563+
#else
564564
#if SPI_INTERFACES_COUNT > 0
565565
(hwspi._spi == &SPI)
566566
#endif
@@ -579,6 +579,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) {
579579
#if SPI_INTERFACES_COUNT > 5
580580
|| (hwspi._spi == &SPI5)
581581
#endif
582+
#endif // end SPI_INTERFACES_COUNT
582583
) {
583584
hwspi._spi->begin();
584585
}

0 commit comments

Comments
 (0)