examples: testlibusb: Formatting, whitespace and functional cleanup Make the coding style and whitespace consistent with the rest of the library source code. In the print_device() function, the 'level' argument is unnecessary, so remove it and the associated space padding. Switch to use printf() directly instead of formatting the description into a single buffer. This not only simplifies the code but avoids truncating the description for devices with larger descriptor strings. Make the output formatting consistent by lining up all the printed values and using the same notation for all hexadecimal values. Inspired by PR #452, enable printing all available BOS device capability descriptors, not just the first one. Closes #452 Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD and Haiku 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)