writeBytes method
Writes data via libusb_bulk_transfer on the bulk-OUT endpoint
associated with the handle. The handle is the UsbOpenResult.platformHandle
returned by openForFfi.
Implementation
@override
Future<void> writeBytes({
required int handleId,
required Uint8List data,
required int timeoutMs,
}) async {
if (writeError != null) throw writeError!;
final h = _handles[handleId];
if (h == null) throw StateError('Invalid handle $handleId');
h.written.add(Uint8List.fromList(data));
}