From 99530f9ce493c04fc6256bb8468529a0607d8678 Mon Sep 17 00:00:00 2001 From: Friedl Ulrich Date: Thu, 5 Feb 2015 22:02:59 +0100 Subject: [PATCH] SPI Device with cgo --- rfm69device.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfm69device.go b/rfm69device.go index 17fd0a2..bec32d7 100644 --- a/rfm69device.go +++ b/rfm69device.go @@ -46,7 +46,7 @@ func (r *Device) writeReg(addr, data byte) error { tx[0] = addr | 0x80 tx[1] = data log.Printf("write %x: %x", addr, data) - rx, err := r.SpiDevice.Xfer(tx) + _, err := r.SpiDevice.Xfer(tx) if err != nil { log.Println(err) } @@ -178,7 +178,7 @@ func (r *Device) encrypt(key []byte) error { tx := make([]byte, 17) tx[0] = REG_AESKEY1 | 0x80 copy(tx[1:], key) - if rx, err := r.SpiDevice.Xfer(tx); err != nil { + if _, err := r.SpiDevice.Xfer(tx); err != nil { return err } }