diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-21 02:55:30 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-21 02:55:30 +0000 |
commit | 3fa6b35e7e89f48749bf0d05d4d03e7ffe51f431 (patch) | |
tree | 7ae3a5fc5837ddefa54193408f0740a117fb19a5 /libusb/os/windows_usb.c | |
parent | 0c568de2e355ade7ba1965437e9dc9d6459eed5c (diff) | |
download | libusb-3fa6b35e7e89f48749bf0d05d4d03e7ffe51f431.tar.gz |
r96: added sources support (Orin Eman)
Diffstat (limited to 'libusb/os/windows_usb.c')
-rw-r--r-- | libusb/os/windows_usb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 7ad958d..b5ce63f 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -2709,7 +2709,7 @@ static int _hid_get_config_descriptor(struct hid_device_priv* dev, void *data, i cd->bLength = LIBUSB_DT_CONFIG_SIZE; cd->bDescriptorType = LIBUSB_DT_CONFIG; - cd->wTotalLength = config_total_len; + cd->wTotalLength = (uint16_t) config_total_len; cd->bNumInterfaces = 1; cd->bConfigurationValue = 1; cd->iConfiguration = 0; @@ -2817,7 +2817,7 @@ static int _hid_get_hid_descriptor(struct hid_device_priv* dev, void *data, int d.bCountryCode = 0; d.bNumDescriptors = 1; d.bClassDescriptorType = LIBUSB_DT_REPORT; - d.wClassDescriptorLength = report_len; + d.wClassDescriptorLength = (uint16_t)report_len; if(size > LIBUSB_DT_HID_SIZE) size = LIBUSB_DT_HID_SIZE; @@ -2923,6 +2923,7 @@ static int _hid_get_report(struct hid_device_priv* dev, HANDLE hid_handle, int i return size + 1; // TODO: // return winio_write_sync(hid_handle, buf, size + 1, USBI_DEFAULT_TIMEOUT); + return -1; } static int _hid_set_report(struct hid_device_priv* dev, HANDLE hid_handle, int id, void *data, int size) @@ -2939,6 +2940,7 @@ static int _hid_set_report(struct hid_device_priv* dev, HANDLE hid_handle, int i return size + 1; // TODO: // return winio_write_sync(hid_handle, buf, size + 1, USBI_DEFAULT_TIMEOUT); + return -1; } static int _hid_get_feature(struct hid_device_priv* dev, HANDLE hid_handle, int id, void *data, int size) |