commit | d21956dc3357bb40cde6d47eaf2497caf8d0a2de | [log] [tgz] |
---|---|---|
author | Chris Dickens <christopher.a.dickens@gmail.com> | Tue Apr 28 12:08:08 2020 -0700 |
committer | Chris Dickens <christopher.a.dickens@gmail.com> | Tue Apr 28 12:08:08 2020 -0700 |
tree | 246da844ea27ccf20b25f2e91d3e7e24e88e398e | |
parent | a157b55656e7130c4ea118abcb1dfad21db428b8 [diff] |
core: Kill backend get_device_descriptor() function Simplify the library by moving device descriptor initialization to the backend, while the device is being set up. This removes the duplication of essentially the same code in every backend. Add some missing calls to libusb_le16_to_cpu() when reading multi-byte fields from the "raw" device descriptor. It has worked thus far because the platforms not using the calls happen to be the same endianness as the USB bus. While here, throw in some static assertions to ensure there is no mismatch between the libusb device descriptor structure and any device descriptor structure provided by the platform headers. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).
libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.
libusb homepage: http://libusb.info/
Developers will wish to consult the API documentation: http://api.libusb.info
Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info
(Please use the mailing list rather than mailing developers directly)