From 4cac391d1390a0ec41ec068bea7088b4d61412e5 Mon Sep 17 00:00:00 2001 From: Daniel Esteban Date: Sat, 24 Feb 2018 11:31:53 +0100 Subject: [PATCH] typo fix --- drivers/gpio/aip1640_driver.go | 14 +++++++------- drivers/gpio/tm1638_driver.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/aip1640_driver.go b/drivers/gpio/aip1640_driver.go index ff9feecc5..77dd847b2 100644 --- a/drivers/gpio/aip1640_driver.go +++ b/drivers/gpio/aip1640_driver.go @@ -21,7 +21,7 @@ const ( // // Library ported from: https://github.com/wemos/WEMOS_Matrix_LED_Shield_Arduino_Library type AIP1640Driver struct { - pintClock *DirectPinDriver + pinClock *DirectPinDriver pinData *DirectPinDriver name string intensity byte @@ -34,7 +34,7 @@ type AIP1640Driver struct { func NewAIP1640Driver(a gobot.Connection, clockPin string, dataPin string) *AIP1640Driver { t := &AIP1640Driver{ name: gobot.DefaultName("AIP1640Driver"), - pintClock: NewDirectPinDriver(a, clockPin), + pinClock: NewDirectPinDriver(a, clockPin), pinData: NewDirectPinDriver(a, dataPin), intensity: 7, connection: a, @@ -49,7 +49,7 @@ func NewAIP1640Driver(a gobot.Connection, clockPin string, dataPin string) *AIP1 // Start initializes the tm1638, it uses a SPI-like communication protocol func (a *AIP1640Driver) Start() (err error) { a.pinData.On() - a.pintClock.On() + a.pinClock.On() return } @@ -82,9 +82,9 @@ func (a *AIP1640Driver) Display() { a.sendData(byte(i), a.buffer[i]) a.pinData.Off() - a.pintClock.Off() + a.pinClock.Off() time.Sleep(1 * time.Millisecond) - a.pintClock.On() + a.pinClock.On() a.pinData.On() } @@ -145,7 +145,7 @@ func (a *AIP1640Driver) sendData(address byte, data byte) { // send writes data on the module func (a *AIP1640Driver) send(data byte) { for i := 0; i < 8; i++ { - a.pintClock.Off() + a.pinClock.Off() if (data & 1) > 0 { a.pinData.On() @@ -154,6 +154,6 @@ func (a *AIP1640Driver) send(data byte) { } data >>= 1 - a.pintClock.On() + a.pinClock.On() } } diff --git a/drivers/gpio/tm1638_driver.go b/drivers/gpio/tm1638_driver.go index f3cf738ad..246dd6491 100644 --- a/drivers/gpio/tm1638_driver.go +++ b/drivers/gpio/tm1638_driver.go @@ -33,7 +33,7 @@ const ( // Ported from the Arduino driver https://github.com/rjbatista/tm1638-library type TM1638Driver struct { - pintClock *DirectPinDriver + pinClock *DirectPinDriver pinData *DirectPinDriver pinStrobe *DirectPinDriver fonts map[string]byte @@ -46,7 +46,7 @@ type TM1638Driver struct { func NewTM1638Driver(a gobot.Connection, clockPin string, dataPin string, strobePin string) *TM1638Driver { t := &TM1638Driver{ name: gobot.DefaultName("TM1638"), - pintClock: NewDirectPinDriver(a, clockPin), + pinClock: NewDirectPinDriver(a, clockPin), pinData: NewDirectPinDriver(a, dataPin), pinStrobe: NewDirectPinDriver(a, strobePin), fonts: NewTM1638Fonts(), @@ -63,7 +63,7 @@ func NewTM1638Driver(a gobot.Connection, clockPin string, dataPin string, strobe func (t *TM1638Driver) Start() (err error) { t.pinStrobe.On() - t.pintClock.On() + t.pinClock.On() t.sendCommand(TM1638DataCmd) t.sendCommand(TM1638DispCtrl | 8 | 7) @@ -102,7 +102,7 @@ func (t *TM1638Driver) sendCommand(cmd byte) { // send writes data on the module func (t *TM1638Driver) send(data byte) { for i := 0; i < 8; i++ { - t.pintClock.Off() + t.pinClock.Off() if (data & 1) > 0 { t.pinData.On() @@ -111,7 +111,7 @@ func (t *TM1638Driver) send(data byte) { } data >>= 1 - t.pintClock.On() + t.pinClock.On() } }