Displaying 4 results from an estimated 4 matches for "hidopendevice".
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...bably responsible for. Would it make sense to
confine libhid to low-level operations, and leave the decision of
trying to reopen vs. retrying to open to the high-level driver, in
this case usbhid-ups?
I envision that the code in usbhid-ups:reconnect_ups() could be
changed to something like:
hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN);
if (hd == NULL) {
/* reopening failed, try opening new device */
hd = HIDOpenDevice(&udev, &curDevice, regex_matcher, MODE_OPEN);
}
if (hd == NULL) {
return 0;
}
Note "regex_matcher", not "reopen_matcher"...
2007 Aug 22
1
[nut-commits] svn commit r1072 - in trunk: . drivers
Arjen de Korte wrote:
> - HIDOpenDevice() will now handle closing the device on reload if
> needed, so that HIDCloseDevice() can now really close it and free
> the allocated memory for report buffer and parsed report descriptor.
If I remember correctly, the old behavior on "reopen" was to keep the
previous report descrip...
2007 Jun 21
2
[nut-commits] svn commit r971 - in trunk: . drivers
...-->8---
Best regards, Arjen
> {
> upsdebugx(2, "==================================================");
> upsdebugx(2, "= device has been disconnected, try to reconnect =");
> @@ -1001,8 +1001,12 @@
> udev = NULL;
> #endif
>
> - if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher,
> MODE_REOPEN)) == NULL)
> - dstate_datastale();
> + if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher,
> MODE_REOPEN)) == NULL) {
> + dstate_datastale();
> +
> + /* Wait a bit before retrying... */
> + sleep...
2007 Aug 28
0
[nut-commits] svn commit r1076 - in trunk: . drivers
...e_usb), you no longer need to
> include libhid anymore. The USB matcher functions (which were not
> really HID specific functions) are now within libusb.
>
> * drivers/megatec_usb.c,tripplite_usb.c,Makefile.am:
> - Applied the change above.
>
> * drivers/usbhid.[ch]:
> - The HIDOpenDevice() and HIDCloseDevice() functions no longer exist.
> These are replaced by direct calls to the communication subdrivers.
> - The driver now gets a callback from libshut_open() and libusb_open()
> when a report descriptor has been retrieved from the USB/SHUT device
> and parses it and the...