open method
@brief Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
If @p serial_number is NULL, the first device with the specified VID and PID is opened.
This function sets the return value of hid_error().
@ingroup API @param vendor_id The Vendor ID (VID) of the device to open. @param product_id The Product ID (PID) of the device to open. @param serial_number The Serial Number of the device to open (Optionally NULL).
@returns This function returns a pointer to a #hid_device object on success or NULL on failure.
Implementation
ffi.Pointer<hid_device> open(
int vendor_id,
int product_id,
ffi.Pointer<wchar_t> serial_number,
) {
return _open(
vendor_id,
product_id,
serial_number,
);
}