Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
conejoninja authored and deadprogram committed Apr 12, 2018
1 parent 4471756 commit d84c724
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions drivers/gpio/aip1640_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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
}
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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()
Expand All @@ -154,6 +154,6 @@ func (a *AIP1640Driver) send(data byte) {
}
data >>= 1

a.pintClock.On()
a.pinClock.On()
}
}
10 changes: 5 additions & 5 deletions drivers/gpio/tm1638_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(),
Expand All @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -111,7 +111,7 @@ func (t *TM1638Driver) send(data byte) {
}
data >>= 1

t.pintClock.On()
t.pinClock.On()
}
}

Expand Down

0 comments on commit d84c724

Please sign in to comment.