From 02084fd8a53de72d30e2f4ffda6d0a85b6b9b426 Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Sun, 8 Dec 2019 16:05:35 +0100 Subject: [PATCH] improvements in st7735/st7789 drivers --- st7735/st7735.go | 20 -------------------- st7789/st7789.go | 12 ------------ 2 files changed, 32 deletions(-) diff --git a/st7735/st7735.go b/st7735/st7735.go index fb0fef3..f6bdb74 100644 --- a/st7735/st7735.go +++ b/st7735/st7735.go @@ -151,29 +151,9 @@ func (d *Device) Configure(cfg Config) { if d.model == GREENTAB { d.InvertColors(false) - d.Command(CASET) - d.Data(0x00) - d.Data(0x02) - d.Data(0x00) - d.Data(0x7F + 0x02) - d.Command(RASET) - d.Data(0x00) - d.Data(0x01) - d.Data(0x00) - d.Data(0x9F + 0x01) } else if d.model == MINI80x160 { d.isBGR = true d.InvertColors(true) - d.Command(CASET) - d.Data(0x00) - d.Data(0x00) - d.Data(0x00) - d.Data(0x7F) - d.Command(RASET) - d.Data(0x00) - d.Data(0x00) - d.Data(0x00) - d.Data(0x9F) } // common color adjustment diff --git a/st7789/st7789.go b/st7789/st7789.go index c6d2450..6d01c4a 100644 --- a/st7789/st7789.go +++ b/st7789/st7789.go @@ -100,18 +100,6 @@ func (d *Device) Configure(cfg Config) { time.Sleep(10 * time.Millisecond) d.SetRotation(d.rotation) - - d.Command(CASET) - d.Data(0x00) - d.Data(uint8(d.columnOffset)) - d.Data((240 + uint8(d.columnOffset)) >> 8) - d.Data(((240 + uint8(d.columnOffset)) >> 8) & 0xFF) - d.Command(RASET) - d.Data(0x00) - d.Data(uint8(d.rowOffset)) - d.Data((240 + uint8(d.rowOffset)) >> 8) - d.Data(((240 + uint8(d.rowOffset)) >> 8) & 0xFF) - d.InvertColors(true) d.Command(NORON)