send method
Send the specified bytes to the device and return an identical number of bytes sent from the device.
Implementation
@override
Uint8List send(List<int> txData) {
if (txData.length > 40) throw SpiException('max data len 40 bytes');
Uint8List rxData = Uint8List(txData.length);
int result = _send(_fd, _speed, txData, rxData, txData.length);
if (result < 0) {
throw SpiException('send failed: $result');
}
return rxData;
}