Skip to content

Commit

Permalink
digispark: remove test method that should not be in adaptor
Browse files Browse the repository at this point in the history
Signed-off-by: Ron Evans <[email protected]>
  • Loading branch information
deadprogram committed Aug 24, 2018
1 parent fc1e1ee commit 99f9156
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions platforms/digispark/digispark_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,3 @@ func (d *Adaptor) GetConnection(address int, bus int) (connection i2c.Connection
func (d *Adaptor) GetDefaultBus() int {
return 0
}

// TestConnection returns found i2c connections to devices in a given range of addresses
func (d *Adaptor) TestConnection(start, end int, success func(int)) error {
conn, err := d.GetConnection(start, d.GetDefaultBus())
if err != nil {
return err
}
c := conn.(*digisparkI2cConnection)
if !d.i2c {
return errors.New("Digispark i2c not initialized")
}
if start > end {
start, end = end, start
}
for ; start <= end; start++ {
if err = c.Test(uint8(start)); err == nil {
success(start)
}
}
return nil
}

0 comments on commit 99f9156

Please sign in to comment.