mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 13:23:26 +00:00
ili9341: change to use drivers.SPI interface
This commit is contained in:
+4
-2
@@ -4,15 +4,17 @@ package ili9341
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"machine"
|
"machine"
|
||||||
|
|
||||||
|
"tinygo.org/x/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
var buf [64]byte
|
var buf [64]byte
|
||||||
|
|
||||||
type spiDriver struct {
|
type spiDriver struct {
|
||||||
bus machine.SPI
|
bus drivers.SPI
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSPI(bus machine.SPI, dc, cs, rst machine.Pin) *Device {
|
func NewSPI(bus drivers.SPI, dc, cs, rst machine.Pin) *Device {
|
||||||
return &Device{
|
return &Device{
|
||||||
dc: dc,
|
dc: dc,
|
||||||
cs: cs,
|
cs: cs,
|
||||||
|
|||||||
Reference in New Issue
Block a user