Commit graph

6 commits

Author SHA1 Message Date
Andrew Chant
8ea8101b04 usblib: usb_device_get_string decoding fixes.
usb_device_get_string converts incoming ucs-2 text
to ascii by truncating the upper byte of each
character.  This is error prone.

This patch introduces usb_device_get_string_ucs2
to access raw USB string descriptors, as well as
changes usb_device_get_string to replace any non
ascii character with '?'.

Bug: 70163357
Change-Id: If8f98fee4be6ea75dc0f7ce7beba7fd7b6aabf88
Merged-In: If8f98fee4be6ea75dc0f7ce7beba7fd7b6aabf88
Test: Connected & disconnected a NuForceDAC.
2017-12-19 22:20:51 +00:00
Philip P. Moltmann
96c59d848a Merge "usblib: Wrap USBDEVFS_REAPURBNDELAY ioctl" 2016-10-27 16:15:12 +00:00
Philip P. Moltmann
3695285d5d usblib: Wrap USBDEVFS_REAPURBNDELAY ioctl
Test: Test is submitted alongside this change
Bug: 31288102
Change-Id: I99311879150ef3f647c65205b35254736dde6de7
2016-10-26 09:46:28 -07:00
Vitalii Tomkiv
dfd21b89f2 Add timeout to usb_device_control_transfer call in usbhost code.
usb_device_control_transfer used to use "0" value in control_transfer
call which resulted in unlimited timeout. In case of bad USB devices
connected it resulted in usbhost stuck state.

Bug: 31923641
Test: manual run and test with bad devices.
Change-Id: I4a2a691a6d83107f72ba506522c932085bd09624
2016-10-25 15:58:56 -07:00
Philip P. Moltmann
9879bb2ba2 usb-bulk-transfer: Clarify sign-iy-ness of param
Parameter is implicily converted to unsigned when assigned to the struct,
so make sure users are aware of this.

Test: compiled
Change-Id: I25ca6b24591497aa4e7ce8db262ce1099c2b7b09
2016-09-21 15:51:35 +00:00
Elliott Hughes
e0a7c773ed Move libusbhost's headers into libusbhost.
Change-Id: Ic5ff65bd6456ea3cc92e0c8f9d7a6f499e58dbfc
2016-09-16 10:43:56 -07:00