mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-19 22:23:58 +00:00
rename busy fields to isBusy
This commit is contained in:
committed by
deadprogram
parent
807ae3da9b
commit
2e007a6de7
@@ -18,11 +18,11 @@ const (
|
||||
const Baudrate = 4_000_000 // 4 MHz
|
||||
|
||||
type Device struct {
|
||||
bus drivers.SPI
|
||||
cs drivers.PinOutput
|
||||
dc drivers.PinOutput
|
||||
rst drivers.PinOutput
|
||||
busy drivers.PinInput
|
||||
bus drivers.SPI
|
||||
cs drivers.PinOutput
|
||||
dc drivers.PinOutput
|
||||
rst drivers.PinOutput
|
||||
isBusy drivers.PinInput
|
||||
|
||||
blackBuffer []byte
|
||||
redBuffer []byte
|
||||
@@ -206,7 +206,7 @@ func (d *Device) WaitUntilIdle() {
|
||||
// give it some time to get busy
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
for d.busy() { // high = busy
|
||||
for d.isBusy() { // high = busy
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,6 @@ func (d *Device) Configure(c Config) error {
|
||||
d.cs = cs.Set
|
||||
d.dc = dc.Set
|
||||
d.rst = rst.Set
|
||||
d.busy = busy.Get
|
||||
d.isBusy = busy.Get
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user