Update ds248x.go

pull/13/head
Audrius Paskevicius 5 years ago committed by GitHub
parent 15ee888cc3
commit 7529784a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -171,8 +171,8 @@ func (d *Dev) ChannelSelect(ch int) (err error) {
if ch > 7 {
ch = 7
}
csc := []byte{cscIO0w, cscIO1w, cscIO2w, cscIO3w, cscIO4w, cscIO5w, cscIO6w, cscIO7w,}
buf := []byte{cmdChannelSelect, csc[ch],}
csc := []byte{cscIO0w, cscIO1w, cscIO2w, cscIO3w, cscIO4w, cscIO5w, cscIO6w, cscIO7w}
buf := []byte{cmdChannelSelect, csc[ch]}
if err = d.i2c.Tx(buf, nil); err != nil {
return fmt.Errorf("ds2482-800: error while selecting channel: %s", err)
}
@ -318,7 +318,7 @@ func (d *Dev) makeDev(opts *Opts) error {
case isDS2482x100:
case isDS2482x800:
buf := []byte{cmdChannelSelect, cscIO0w,}
buf := []byte{cmdChannelSelect, cscIO0w}
if err := d.i2c.Tx(buf, nil); err != nil {
return fmt.Errorf("ds2482-800: error while selecting channel: %s", err)
}

Loading…
Cancel
Save