@@ -1640,7 +1640,7 @@ uint16_t Adafruit_SPITFT::color565(uint8_t red, uint8_t green, uint8_t blue) {
16401640 */
16411641void Adafruit_SPITFT::sendCommand (uint8_t commandByte, uint8_t *dataBytes, uint8_t numDataBytes) {
16421642 SPI_BEGIN_TRANSACTION ();
1643- if (_cs > 0 ) SPI_CS_LOW ();
1643+ if (_cs >= 0 ) SPI_CS_LOW ();
16441644
16451645 SPI_DC_LOW (); // Command mode
16461646 spiWrite (commandByte); // Send the command byte
@@ -1651,7 +1651,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8
16511651 dataBytes++;
16521652 }
16531653
1654- if (_cs > 0 ) SPI_CS_HIGH ();
1654+ if (_cs >= 0 ) SPI_CS_HIGH ();
16551655 SPI_END_TRANSACTION ();
16561656}
16571657
@@ -1663,7 +1663,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8
16631663 */
16641664void Adafruit_SPITFT::sendCommand (uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes) {
16651665 SPI_BEGIN_TRANSACTION ();
1666- if (_cs > 0 ) SPI_CS_LOW ();
1666+ if (_cs >= 0 ) SPI_CS_LOW ();
16671667
16681668 SPI_DC_LOW (); // Command mode
16691669 spiWrite (commandByte); // Send the command byte
@@ -1673,7 +1673,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, const uint8_t *dataBytes,
16731673 spiWrite (pgm_read_byte (dataBytes++)); // Send the data bytes
16741674 }
16751675
1676- if (_cs > 0 ) SPI_CS_HIGH ();
1676+ if (_cs >= 0 ) SPI_CS_HIGH ();
16771677 SPI_END_TRANSACTION ();
16781678}
16791679
0 commit comments