Enabling ST7735_SAVE_SPCR breaks this library (resulting in a white screen). The SPI Status Register contains a flag for doubling the SPI speed which was not being written like it is by Arduino's SPI.beginTransaction.
spi_begin and spi_end now follow the same structure as their SPI library counterparts. spi_end no longer switches back to the old settings (I was still experiencing problems in this scenario, even with the display being the only device used on the bus). spi_begin instead copies the values into the registers instead of switching them. While switching them back in spi_end would be playing nice for other libraries, other libraries should be using SPI.beginTransaction with SPISettings or implementing their own system to set the settings before trying to use the SPI.
https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/SPI/src/SPI.h#L203
Finally, the #define for enabling this setting writing behaviour is renamed to ST7735_SAVE_SPI_SETTINGS, a compiler warning is emitted for the old one (ST7735_SAVE_SPCR) and sets ST7735_SAVE_SPI_SETTINGS for you. Turning this off is acceptable when there is no other other SPI device use and you want that extra little bit of speed.
Enabling
ST7735_SAVE_SPCR
breaks this library (resulting in a white screen). The SPI Status Register contains a flag for doubling the SPI speed which was not being written like it is by Arduino'sSPI.beginTransaction
.spi_begin
andspi_end
now follow the same structure as their SPI library counterparts.spi_end
no longer switches back to the old settings (I was still experiencing problems in this scenario, even with the display being the only device used on the bus).spi_begin
instead copies the values into the registers instead of switching them. While switching them back inspi_end
would be playing nice for other libraries, other libraries should be usingSPI.beginTransaction
withSPISettings
or implementing their own system to set the settings before trying to use the SPI. https://github.com/arduino/ArduinoCore-avr/blob/master/libraries/SPI/src/SPI.h#L203Finally, the
#define
for enabling this setting writing behaviour is renamed toST7735_SAVE_SPI_SETTINGS
, a compiler warning is emitted for the old one (ST7735_SAVE_SPCR
) and setsST7735_SAVE_SPI_SETTINGS
for you. Turning this off is acceptable when there is no other other SPI device use and you want that extra little bit of speed.