search for: hiddevicematcher_t

Displaying 5 results from an estimated 5 matches for "hiddevicematcher_t".

2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...the exact matcher ignores the "Bus" field, because > - it can change during a reconnect. */ > - return 1; > + > + return 2; > } > > -/* constructor: return a new matcher that matches the exact HIDDevice_t > - * d. Return NULL with errno set on error. */ > -HIDDeviceMatcher_t *new_exact_matcher(HIDDevice_t *d) > +/* constructor: create an exact matcher that matches the device. > + * On success, return 0 and store the matcher in *matcher. On > + * error, return -1 with errno set > + */ > +int HIDNewExactMatcher(HIDDeviceMatcher_t **matcher, HIDDevice_t *hd...
2007 Feb 16
1
Re: [nut-commits] svn commit r808 - in trunk: . drivers
...Desc must point to a large enough > buffer. There's no way to know the size ahead of time. Matcher is > a linked list of matchers (see libhid.h), and the opened device > - must match all of them. */ > -static int libusb_open(usb_dev_handle **udevp, HIDDevice *curDevice, HIDDeviceMatcher_t *matcher, unsigned char *ReportDesc, int mode) > + must match all of them. Also note: the string components of > + curDevice are filled with allocated strings that must later be > + freed. */ > +static int libusb_open(usb_dev_handle **udevp, HIDDevice_t *curDevice, HIDDeviceMat...
2007 Jan 23
2
Voltage override in megatec and megatec-over-usb [was: Re: nut-2.0.5 megatec + Online Xanto]
On 1/23/07, Henning Brauer <hb-nut@bsws.de> wrote: > good new first: the megatec driverin 2.0.5 now works with the Online > Xanto S3000R here - well, for the very basics. > > the UPS has NO way ofidentifying itself. It also does not respond to > the power ratings query ("F"). I previously used a hacked up fentonups > driver. This means the driver cannot figure out
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...(p->vid==d->VendorID) && (p->pid==d->ProductID) ) > + { > + usb_ups_device = p; > + return 1; > + } > + } > + > + return 0; > + } > + > + static int comm_usb_open(const char *param) > + { > + HIDDeviceMatcher_t match; > + static usb_ups_t param_arg; > + const char* p; > + int ret,i; > + union _u { > + unsigned char report_desc[4096]; > + char flush_buf[256]; > + } u; > + upsdebugx(4, "comm_usb_open&q...
2006 Dec 05
3
megatec over USB - new driver patch
...p = (usb_ups_t*)privdata; + + if (NULL!=p) + { + if ( (p->vid==d->VendorID) && (p->pid==d->ProductID) ) + { + usb_ups_device = p; + return 1; + } + } + + return 0; +} + +static int comm_usb_open(const char *param) +{ + HIDDeviceMatcher_t match; + static usb_ups_t param_arg; + const char* p; + int ret,i; + union _u { + unsigned char report_desc[4096]; + char flush_buf[256]; + } u; + + memset(&match,0,sizeof(match)); + match.match_function = &comm_us...