From f8e5551b30972f18cc5caa1afe21d09e0e71b23e Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Sat, 13 Apr 2019 13:57:01 -0700 Subject: [PATCH] Stop checking if _cs is > 0 --- Adafruit_SPITFT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Adafruit_SPITFT.cpp b/Adafruit_SPITFT.cpp index d866bc3..2001249 100644 --- a/Adafruit_SPITFT.cpp +++ b/Adafruit_SPITFT.cpp @@ -1640,7 +1640,7 @@ uint16_t Adafruit_SPITFT::color565(uint8_t red, uint8_t green, uint8_t blue) { */ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8_t numDataBytes) { SPI_BEGIN_TRANSACTION(); - if(_cs >= 0) SPI_CS_LOW(); + SPI_CS_LOW(); SPI_DC_LOW(); // Command mode spiWrite(commandByte); // Send the command byte @@ -1651,7 +1651,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8 dataBytes++; } - if(_cs >= 0) SPI_CS_HIGH(); + SPI_CS_HIGH(); SPI_END_TRANSACTION(); } @@ -1663,7 +1663,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8 */ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes) { SPI_BEGIN_TRANSACTION(); - if(_cs >= 0) SPI_CS_LOW(); + SPI_CS_LOW(); SPI_DC_LOW(); // Command mode spiWrite(commandByte); // Send the command byte @@ -1673,7 +1673,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, spiWrite(pgm_read_byte(dataBytes++)); // Send the data bytes } - if(_cs >= 0) SPI_CS_HIGH(); + SPI_CS_HIGH(); SPI_END_TRANSACTION(); }