mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2024-10-03 18:18:46 -04:00
Stop checking if _cs is > 0
This commit is contained in:
parent
3f53a83a7b
commit
f8e5551b30
@ -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) {
|
void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8_t numDataBytes) {
|
||||||
SPI_BEGIN_TRANSACTION();
|
SPI_BEGIN_TRANSACTION();
|
||||||
if(_cs >= 0) SPI_CS_LOW();
|
SPI_CS_LOW();
|
||||||
|
|
||||||
SPI_DC_LOW(); // Command mode
|
SPI_DC_LOW(); // Command mode
|
||||||
spiWrite(commandByte); // Send the command byte
|
spiWrite(commandByte); // Send the command byte
|
||||||
@ -1651,7 +1651,7 @@ void Adafruit_SPITFT::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8
|
|||||||
dataBytes++;
|
dataBytes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_cs >= 0) SPI_CS_HIGH();
|
SPI_CS_HIGH();
|
||||||
SPI_END_TRANSACTION();
|
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) {
|
void Adafruit_SPITFT::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes) {
|
||||||
SPI_BEGIN_TRANSACTION();
|
SPI_BEGIN_TRANSACTION();
|
||||||
if(_cs >= 0) SPI_CS_LOW();
|
SPI_CS_LOW();
|
||||||
|
|
||||||
SPI_DC_LOW(); // Command mode
|
SPI_DC_LOW(); // Command mode
|
||||||
spiWrite(commandByte); // Send the command byte
|
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
|
spiWrite(pgm_read_byte(dataBytes++)); // Send the data bytes
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_cs >= 0) SPI_CS_HIGH();
|
SPI_CS_HIGH();
|
||||||
SPI_END_TRANSACTION();
|
SPI_END_TRANSACTION();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user