hid_enumerate method
@brief Enumerate the HID Devices.
This function returns a linked list of all the HID devices attached to the system which match vendor_id and product_id. If @p vendor_id is set to 0 then any vendor matches. If @p product_id is set to 0 then any product matches. If @p vendor_id and @p product_id are both set to 0, then all HID devices will be returned.
@ingroup API @param vendor_id The Vendor ID (VID) of the types of device to open. @param product_id The Product ID (PID) of the types of device to open.
@returns This function returns a pointer to a linked list of type struct #hid_device_info, containing information about the HID devices attached to the system, or NULL in the case of failure or if no HID devices present in the system. Call hid_error(NULL) to get the failure reason.
@note The returned value by this function must to be freed by calling hid_free_enumeration(), when not needed anymore.
Implementation
ffi.Pointer<hid_device_info> hid_enumerate(
int vendor_id,
int product_id,
) {
return _hid_enumerate(
vendor_id,
product_id,
);
}