transferOut method

Future<USBOutTransferResult> transferOut(
  1. int endpointNumber,
  2. Uint8List data
)

Implementation

Future<USBOutTransferResult> transferOut(
  int endpointNumber,
  Uint8List data,
) async {
  if (!opened) {
    throw Exception('Device is not open');
  }
  try {
    final result = await _transferOut(endpointNumber, data.toJS).toDart;
    return result;
  } catch (e) {
    throw Exception('TransferOut failed: $e');
  }
}