use the correct rdesc size

This commit is contained in:
Denis 2023-12-08 22:52:26 +01:00
parent 9228ccc15f
commit a0eb198851
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03
3 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ static bool hidraw_matches(
return false;
} else if (in_dev->info.vendor != in_filters->vid) {
return false;
}
} else if (in_dev->rdesc.size != in_filters->rdesc_size)
return true;
}

View file

@ -111,7 +111,7 @@ int iio_open_device(
const char *const dev_name = dev_iio_get_name(out_dev->iiodev);
printf(
"Opened iio device:\n name: %s has accel: %s\n has anglvel: %s\n",
"Opened iio device:\n name: %s\n has accel: %s\n has anglvel: %s\n",
(dev_name != NULL) ? dev_name : "NULL",
dev_iio_has_accel(out_dev->iiodev) ? "yes" : "no",
dev_iio_has_anglvel(out_dev->iiodev) ? "yes" : "no"

View file

@ -28,7 +28,7 @@ typedef enum input_dev_type {
typedef struct hidraw_filters {
const int16_t pid;
const int16_t vid;
const uint16_t rdesc_size; // wc -c < /sys/class/hidraw/hidraw0/device/report_descriptor
const uint32_t rdesc_size; // wc -c < /sys/class/hidraw/hidraw0/device/report_descriptor
} hidraw_filters_t;
typedef struct uinput_filters {