1
0
Fork 0

drivers: st7789: Automatically park ready for the next call to write data

This makes line-by-line drawing more efficient because don't have to
handle the dc line. The optimization targets font rendering and if good
for slightly less than 10% rendering improvement.
This commit is contained in:
Daniel Thompson 2020-03-09 21:32:34 +00:00
parent 69bc452c65
commit 820764081e

View file

@ -146,9 +146,9 @@ class ST7789_SPI(ST7789):
self.cs(0) self.cs(0)
self.spi.write(bytearray([cmd])) self.spi.write(bytearray([cmd]))
self.cs(1) self.cs(1)
self.dc(1)
def write_data(self, buf): def write_data(self, buf):
self.dc(1)
self.cs(0) self.cs(0)
self.spi.write(buf) self.spi.write(buf)
self.cs(1) self.cs(1)