mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-04 23:17:47 +00:00
3b16972ed8
Signed-off-by: deadprogram <ron@hybridgroup.com>
31 lines
456 B
Go
31 lines
456 B
Go
//go:build wioterminal
|
|
// +build wioterminal
|
|
|
|
package main
|
|
|
|
import (
|
|
"machine"
|
|
|
|
"tinygo.org/x/drivers/ili9341"
|
|
)
|
|
|
|
var (
|
|
display = ili9341.NewSPI(
|
|
machine.SPI3,
|
|
machine.LCD_DC,
|
|
machine.LCD_SS_PIN,
|
|
machine.LCD_RESET,
|
|
)
|
|
|
|
backlight = machine.LCD_BACKLIGHT
|
|
)
|
|
|
|
func init() {
|
|
machine.SPI3.Configure(machine.SPIConfig{
|
|
SCK: machine.LCD_SCK_PIN,
|
|
SDO: machine.LCD_SDO_PIN,
|
|
SDI: machine.LCD_SDI_PIN,
|
|
Frequency: 40000000,
|
|
})
|
|
}
|