openDevice method

Pointer<libusb_device_handle>? openDevice(
  1. int vendorId,
  2. int productId
)

Implementation

Pointer<libusb_device_handle>? openDevice(int vendorId, int productId) {
  final handle =
      _bindings.libusb_open_device_with_vid_pid(nullptr, vendorId, productId);

  if (handle == nullptr) {
    return null;
  }

  return handle;
}