enumerate method

Pointer<hid_device_info> enumerate(
  1. int vendor_id,
  2. int product_id
)

@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. Free this linked list by calling hid_free_enumeration().

Implementation

ffi.Pointer<hid_device_info> enumerate(
  int vendor_id,
  int product_id,
) {
  return _enumerate(
    vendor_id,
    product_id,
  );
}