hid_open_path method

Pointer<hid_device> hid_open_path(
  1. Pointer<Char> path
)

@brief Open a HID device by its path name.

The path name be determined by calling hid_enumerate(), or a platform-specific path name can be used (eg: /dev/hidraw0 on Linux).

@ingroup API @param path The path name of the device to open

@returns This function returns a pointer to a #hid_device object on success or NULL on failure. Call hid_error(NULL) to get the failure reason.

@note The returned object must be freed by calling hid_close(), when not needed anymore.

Implementation

ffi.Pointer<hid_device> hid_open_path(
  ffi.Pointer<ffi.Char> path,
) {
  return _hid_open_path(
    path,
  );
}