transmit method

void transmit(
  1. Uint8List txBuf
)

Implementation

void transmit(Uint8List txBuf) {
  final _txBuf = malloc.allocate<ffi.Uint8>(txBuf.length);
  var index = 0;

  for (var value in txBuf) {
    _txBuf[index++] = value;
  }

  _native.transmit(_fd, _txBuf, txBuf.length);

  malloc.free(_txBuf);
}