summaryrefslogtreecommitdiff
path: root/include/uhd/iface.h
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-07-12 21:02:33 +0300
committerNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-07-12 21:02:33 +0300
commitcc74aae8d020e0ddd069dbb107900cec54e56cd5 (patch)
tree398a64e5f3b76f1c045c083a9129beb13a82f154 /include/uhd/iface.h
parent10f8a6ba71e416605f8e0521198554ffbf72ad9a (diff)
downloadusbhid-dump-cc74aae8d020e0ddd069dbb107900cec54e56cd5.tar.gz
Retrieve declared descriptor size
Request transfer of report descriptor with the destination buffer size equal to report descriptor size declared in HID descriptor, instead of the maximum possible report descriptor size. Only fall back to the maximum possible size, if report descriptor size cannot be retrieved. This fixes ERROR_PIPE when retrieving report descriptors from some devices (e.g. Waltop Vega tablet).
Diffstat (limited to 'include/uhd/iface.h')
-rw-r--r--include/uhd/iface.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/uhd/iface.h b/include/uhd/iface.h
index eabaa7d..9317015 100644
--- a/include/uhd/iface.h
+++ b/include/uhd/iface.h
@@ -45,6 +45,7 @@ struct uhd_iface {
uint8_t int_in_ep_addr; /**< Interrupt IN EP address */
uint16_t int_in_ep_maxp; /**< Interrupt IN EP maximum
packet size */
+ uint16_t rd_len; /**< Report descriptor length */
bool detached; /**< True if the interface was
detached from the kernel
driver, false otherwise */
@@ -77,13 +78,15 @@ extern bool uhd_iface_valid(const uhd_iface *iface);
* @param number Interface number.
* @param int_in_ep_addr Interrupt in endpoint address.
* @param int_in_ep_maxp Interrupt in endpoint maximum packet size.
+ * @param rd_len Report descriptor length.
*
* @return New interface or NULL, if failed to allocate.
*/
extern uhd_iface *uhd_iface_new(const uhd_dev *dev,
uint8_t number,
uint8_t int_in_ep_addr,
- uint16_t int_in_ep_maxp);
+ uint16_t int_in_ep_maxp,
+ uint16_t rd_len);
/**
* Free an interface.