Skip to content

Commit a65dbdb

Browse files
authored
Merge pull request #55 from caternuson/hw_spi_fix
Fix HW SPI preprocessor check
2 parents 6b8287e + 8fe18d6 commit a65dbdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Adafruit_DotStar.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static const uint8_t PROGMEM _DotStarGammaTable[256] = {
101101
class Adafruit_DotStar {
102102

103103
public:
104-
#if defined SPI // Is a default hardware SPI device defined for this board?
104+
#if !defined(SPI_INTERFACES_COUNT) || \
105+
(defined(SPI_INTERFACES_COUNT) && (SPI_INTERFACES_COUNT > 0))
106+
// HW SPI available
105107
Adafruit_DotStar(uint16_t n, uint8_t o = DOTSTAR_BRG, SPIClass *spi = &SPI);
106108
#else
107109
Adafruit_DotStar(uint16_t n, uint8_t o = DOTSTAR_BRG, SPIClass *spi = NULL);

0 commit comments

Comments
 (0)