Skip to content

Commit be9e4f4

Browse files
deadprogramaykevl
authored andcommitted
machine/spi: do not compare slices against nil, same as #612 but for all platforms that use shared SPI implementation for Tx
Signed-off-by: Ron Evans <[email protected]>
1 parent ba49148 commit be9e4f4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/machine/spi.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package machine
55
import "errors"
66

77
var (
8-
ErrTxSlicesRequired = errors.New("SPI Tx requires a write or read slice, or both")
98
ErrTxInvalidSliceSize = errors.New("SPI write and read slices must be same size")
109
)
1110

@@ -28,10 +27,6 @@ var (
2827
// spi.Tx(nil, rx)
2928
//
3029
func (spi SPI) Tx(w, r []byte) error {
31-
if w == nil && r == nil {
32-
return ErrTxSlicesRequired
33-
}
34-
3530
var err error
3631

3732
switch {

0 commit comments

Comments
 (0)