Update Adafruit_SPITFT.cpp

Appease clang-format
This commit is contained in:
Paint Your Dragon 2021-09-17 10:49:34 -07:00 committed by GitHub
parent b654431d6f
commit cda80a23d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1027,10 +1027,12 @@ void Adafruit_SPITFT::writePixels(uint16_t *colors, uint32_t len, bool block,
if (!bigEndian) {
// switch to 16-bit writes
hw_write_masked(&spi_get_hw(pi_spi)->cr0, 15 << SPI_SSPCR0_DSS_LSB, SPI_SSPCR0_DSS_BITS);
hw_write_masked(&spi_get_hw(pi_spi)->cr0, 15 << SPI_SSPCR0_DSS_LSB,
SPI_SSPCR0_DSS_BITS);
spi_write16_blocking(pi_spi, colors, len);
// switch back to 8-bit
hw_write_masked(&spi_get_hw(pi_spi)->cr0, 7 << SPI_SSPCR0_DSS_LSB, SPI_SSPCR0_DSS_BITS);
hw_write_masked(&spi_get_hw(pi_spi)->cr0, 7 << SPI_SSPCR0_DSS_LSB,
SPI_SSPCR0_DSS_BITS);
} else {
spi_write_blocking(pi_spi, (uint8_t *)colors, len * 2);
}