Cleanup
This commit is contained in:
parent
87b5887a4d
commit
e9326a1e33
1 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ func (r *Device) writeReg(addr, data byte) error {
|
||||||
tx := make([]byte, 2)
|
tx := make([]byte, 2)
|
||||||
tx[0] = addr | 0x80
|
tx[0] = addr | 0x80
|
||||||
tx[1] = data
|
tx[1] = data
|
||||||
log.Printf("write %x: %x", addr, data)
|
//log.Printf("write %x: %x", addr, data)
|
||||||
_, err := r.SpiDevice.Xfer(tx)
|
_, err := r.SpiDevice.Xfer(tx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
@ -73,7 +73,7 @@ func (r *Device) readReg(addr byte) (byte, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
log.Printf("read %x: %x", addr, rx[1])
|
//log.Printf("read %x: %x", addr, rx[1])
|
||||||
return rx[1], err
|
return rx[1], err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue