ILI9341 TFT driver (SPI) (#153)

* ili9341: Add spidriver
This commit is contained in:
sago35
2020-06-16 01:46:13 +09:00
committed by GitHub
parent 21ba9392e2
commit 941ea4e28b
13 changed files with 296 additions and 38 deletions
+2 -11
View File
@@ -25,15 +25,6 @@ const (
)
var (
display = ili9341.NewParallel(
machine.LCD_DATA0,
machine.TFT_WR,
machine.TFT_DC,
machine.TFT_CS,
machine.TFT_RESET,
machine.TFT_RD,
)
frameBuffer = [(graphics.BALLHEIGHT + 8) * (graphics.BALLWIDTH + 8)]uint16{}
startTime int64
@@ -56,7 +47,7 @@ var (
func main() {
// configure backlight
machine.TFT_BACKLIGHT.Configure(machine.PinConfig{machine.PinOutput})
backlight.Configure(machine.PinConfig{machine.PinOutput})
// configure display
display.Configure(ili9341.Config{})
@@ -64,7 +55,7 @@ func main() {
width, height := display.Size()
println(width, height)
machine.TFT_BACKLIGHT.High()
backlight.High()
display.SetRotation(ili9341.Rotation270)
DrawBackground()