search for: hid_dev_handle_t

Displaying 4 results from an estimated 4 matches for "hid_dev_handle_t".

2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...*/ > @@ -600,12 +651,12 @@ > /* Matcher is a linked list of matchers (see libhid.h), and the opened > device must match all of them. On success, set *udevp and *hd and > return hd. On failure, return NULL. Mode is MODE_OPEN or MODE_REOPEN. */ > -HIDDevice_t *HIDOpenDevice(hid_dev_handle_t **udevp, HIDDevice_t *hd, HIDDeviceMatcher_t *matcher, int mode) > +HIDDevice_t *HIDOpenDevice(hid_dev_handle_t **udevp, HIDDevice_t *hd, HIDDeviceMatcher_t *matcher, int *mode) > { > int ReportSize; > unsigned char ReportDesc[4096]; > > - if (mode == MODE_REOPEN) { > +...
2018 Feb 04
0
[PATCH 1/3] Skip non-feature HID reports
...eport IDs as feature IDs may lead to undesirable results and errors. --- drivers/libhid.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/libhid.c b/drivers/libhid.c index f6ec644..1cec74a 100644 --- a/drivers/libhid.c +++ b/drivers/libhid.c @@ -301,6 +301,13 @@ void HIDDumpTree(hid_dev_handle_t udev, usage_tables_t *utab) continue; } #else + /* Skip non-feature reports, primarily for OpenUPS - but + * as HIDGetItemData() only cares about feature items, + * do it for all. + */ + if (pData->Type != ITEM_FEATURE) + continue; + if ((vendorID == 0x0463) || (vendorID ==...
2018 Feb 04
0
[PATCH 2/3] Add generic facility to override HID report descriptor in usbhid-ups
...ication type, (ignored, only for backward compatibility)"); #endif + + addvar(VAR_VALUE, "hid_descriptor", "Replacement HID descriptor file"); } #define MAX_EVENT_NUM 32 @@ -1093,16 +1095,52 @@ static void process_boolean_info(const char *nutvalue) static int callback(hid_dev_handle_t udev, HIDDevice_t *hd, unsigned char *rdbuf, int rdlen) { int i; - const char *mfr = NULL, *model = NULL, *serial = NULL; + const char *mfr = NULL, *model = NULL, *serial = NULL, *descfile; #ifndef SHUT_MODE int ret; #endif upsdebugx(2, "Report Descriptor size = %d", rdlen); up...
2018 Feb 04
5
[PATCH 0/3] OpenUPS updates
Hi, I've been checking out NUT with an OpenUPS board over the last couple of weekends, and have noticed that it doesn't seem to report sensible values. This lead me to investigate usbhid-ups and delve into various issues. As mentioned in a github issue, one of the problems is with the report descriptor - dumping this from the usbhid-ups debug output and picking through it reveals that