Displaying 6 results from an estimated 6 matches for "hiddevice_t".
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
...NULL) {
> return 0;
> }
> +
> if (s1 == NULL) {
> return -1;
> }
> +
> if (s2 == NULL) {
> return 1;
> }
> +
> return strcmp(s1, s2);
> }
>
> -/* private callback function for exact matches */
> -static int match_function_exact(HIDDevice_t *d, void *privdata)
> +/* private callback function for exact matches
> + * note: the exact matcher ignores the "Bus" field,
> + * because it can change during a reconnect.
> + */
> +static int match_function_exact(HIDDevice_t *hd, void *privdata)
> {
> - HIDDevice_t...
2007 Feb 16
1
Re: [nut-commits] svn commit r808 - in trunk: . drivers
I get the following error on r809 (but it looks like the code change
happened here). Does HIDDevice_t need to be defined/changed in one of
the headers?
if gcc -DHAVE_CONFIG_H -I. -I../../drivers -I../include
-I../../include -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DINET6 -O2
-D_REENTRANT -DNETSNMP_USE_INLINE -Wall -Dlinux -I. -I/usr/in...
2012 Nov 20
2
[PATCH][RFC] OpenUPS driver
..._FLAG_QUICK_POLL, openups_online_info},
+ {"BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.BatteryPresent", NULL, NULL, HU_FLAG_QUICK_POLL, openups_nobattery_info},
+
+ /* end of structure. */
+ {NULL, 0, 0, NULL, NULL, NULL, 0, NULL}
+};
+
+static const char *openups_format_model(HIDDevice_t * hd)
+{
+ return hd->Product;
+}
+
+static const char *openups_format_mfr(HIDDevice_t * hd)
+{
+ return hd->Vendor ? hd->Vendor : "openUPS";
+}
+
+static const char *openups_format_serial(HIDDevice_t * hd)
+{
+ return hd->Serial;
+}
+
+/* this function allows the subdriver to...
2018 Feb 04
0
[PATCH 2/3] Add generic facility to override HID report descriptor in usbhid-ups
...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);
upsdebug_hex(3, &quo...
2014 Mar 14
2
Creating a new NUT USB HID subdriver
...es to usbhid-ups.c and Makefile.am.
Upon compile, my subdriver failed due to the is_usb_device_supported(). I guess it used to take the vendor and product ID separately, but now just takes a pointer to the USB device. So, remove everything after the first "hd" (so it passes in just the HIDDevice_t hd instead).
It works pretty good after that. However, if I'm going to tailor my hid2nut table, it would really help if there was some master list of all the paths (input.voltage, battery.temperature, etc) NUT supports, instead of having to dig through different driver files to see what's...
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