1
0
mirror of https://github.com/kidoman/embd synced 2024-12-22 21:00:05 +01:00

spi: refactoring for err handling

This commit is contained in:
kunalpowar 2014-05-22 01:11:14 +05:30
parent c42a345a60
commit 9206358abe

View File

@ -230,8 +230,7 @@ func (b *spiBus) TransferAndReceiveByte(data byte) (byte, error) {
d := make([]uint8, 1) d := make([]uint8, 1)
d[0] = uint8(data) d[0] = uint8(data)
err := b.TransferAndRecieveData(d) if err := b.TransferAndRecieveData(d); err != nil {
if err != nil {
return 0, err return 0, err
} }
return d[0], nil return d[0], nil