controlTransfer method
Optionally set transfer control.
Since this plugin supports only sending data to device, only Device-To-Host [requestType]
makes sense.
Implementation
Future<int?> controlTransfer(int requestType, int request, int value,
int index, Uint8List? buffer, int length, int timeout) async {
Map<String, dynamic> args = {
"requestType": requestType,
"request": request,
"value": value,
"index": index,
"buffer": buffer,
"length": length,
"timeout": timeout = 0,
};
try {
return await _methodChannel!.invokeMethod("controlTransfer", args);
} on PlatformException catch (e) {
throw _getTypedException(e);
}
}