machine: move SPI Tx function into separate file

This makes the code a bit cleaner because ErrTxInvalidSliceSize isn't
redefined in every file that uses SPI and Mode0/Mode1/Mode2/Mode3 is
defined for every target that uses SPI.
This commit is contained in:
Ayke van Laethem
2022-09-18 17:59:11 +02:00
committed by Ron Evans
parent 5a92c35536
commit 86ea216e7d
6 changed files with 67 additions and 76 deletions
-5
View File
@@ -5,15 +5,10 @@ package machine
import (
"device/nrf"
"errors"
"runtime/interrupt"
"unsafe"
)
var (
ErrTxInvalidSliceSize = errors.New("SPI write and read slices must be same size")
)
const deviceName = nrf.Device
const (