Fix compiler warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]

This commit is contained in:
Robin Giese 2021-01-31 17:05:02 -08:00
parent b53849e234
commit e9b86373a6

View File

@ -560,7 +560,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) {
if (
#if !defined(SPI_INTERFACES_COUNT)
1
#endif
#else
#if SPI_INTERFACES_COUNT > 0
(hwspi._spi == &SPI)
#endif
@ -579,6 +579,7 @@ void Adafruit_SPITFT::initSPI(uint32_t freq, uint8_t spiMode) {
#if SPI_INTERFACES_COUNT > 5
|| (hwspi._spi == &SPI5)
#endif
#endif // end SPI_INTERFACES_COUNT
) {
hwspi._spi->begin();
}