os.h File Reference

Go to the source code of this file.

Functions

hid_return hid_os_force_claim (HIDInterface *const hidif, int const interface, HIDInterfaceMatcher const *const match, unsigned short retries)
 Forcibly claim an interface from an attached kernel driver.


Function Documentation

hid_return hid_os_force_claim ( HIDInterface *const   hidif,
int const  interface,
HIDInterfaceMatcher const *const   matcher,
unsigned short retries   
)

Forcibly claim an interface from an attached kernel driver.

This function is necessary in Linux because the kernel prefers that applications and drivers claim a device's appropriate interface before accessing it. For libhid to successfully claim an interface that has already been claimed by hiddev (for instance), libhid must first tell the kernel interface to relinquish control over the interface. This may take several tries.

If the return code is anything but HID_RET_SUCCESS, there will probably be more information in the kernel message buffer (available from the "dmesg" command).

Definition at line 12 of file bsd.c.

References HIDInterface_t::dev_handle, ERROR, hid_is_opened(), HID_RET_DEVICE_ALREADY_OPENED, HID_RET_FAIL_CLAIM_IFACE, HID_RET_FAIL_DETACH_DRIVER, HID_RET_INVALID_PARAMETER, HID_RET_SUCCESS, HIDInterface_t::id, TRACE, and WARNING.


Generated on Sun Mar 30 15:28:25 2008 for libhid by  doxygen 1.5.1