bulkTransferIn method

  1. @override
Future<Uint8List> bulkTransferIn(
  1. UsbEndpoint endpoint,
  2. int maxLength,
  3. int timeout
)

Implementation

@override
Future<Uint8List> bulkTransferIn(
    UsbEndpoint endpoint, int maxLength, int timeout) async {
  assert(endpoint.direction == UsbEndpoint.DIRECTION_IN,
      'Endpoint\'s direction should be in');

  List<dynamic> data = await _channel.invokeMethod('bulkTransferIn', {
    'endpoint': endpoint.toMap(),
    'maxLength': maxLength,
    'timeout': timeout,
  });
  return Uint8List.fromList(data.cast<int>());
}