From 820764081ec4327cdc294d52fa6a1d441f220d75 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Mon, 9 Mar 2020 21:32:34 +0000 Subject: [PATCH] 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. --- wasp/drivers/st7789.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasp/drivers/st7789.py b/wasp/drivers/st7789.py index b7edf2e..89ebc4c 100644 --- a/wasp/drivers/st7789.py +++ b/wasp/drivers/st7789.py @@ -146,9 +146,9 @@ class ST7789_SPI(ST7789): self.cs(0) self.spi.write(bytearray([cmd])) self.cs(1) + self.dc(1) def write_data(self, buf): - self.dc(1) self.cs(0) self.spi.write(buf) self.cs(1)