Fix setWindow bug, add CS pin for Clue compatibility. (#180)

* Fix setWindow bug, add CS pin for Clue compatibility.

- corrected bit shift in setWindow that broke high addresses
- added csPin to constructor (will now work with adafruit clue)
- small adjustments and comments to init routine based on working arduino driver

* Update main.go

Updated test example with CS pin.

* Reverting unnecessary (no-effect) change in setRotation.
This commit is contained in:
Jason Striegel
2020-08-12 02:31:43 -04:00
committed by GitHub
parent 06b2023b25
commit 88aeec9f69
3 changed files with 46 additions and 17 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ func main() {
Frequency: 8000000,
Mode: 3,
})
display := st7789.New(machine.SPI0, machine.P6, machine.P7, machine.P8)
display := st7789.New(machine.SPI0, machine.P6, machine.P7, machine.P8, machine.P9)
display.Configure(st7789.Config{Rotation: st7789.NO_ROTATION})
width, height := display.Size()