libx52/lib/libusbx52
nirenjan 40c14fed24 Update calls to libusb_set_debug
With the release of libusb 1.0.22, `libusb_set_debug` has been
deprecated and replaced by `libusb_set_option`. This function is a new
generic API to add additional functionality in the future without having
to introduce new functions.

This change checks for `LIBUSB_API_VERSION` of at least `0x01000106`,
which is the version corresponding to 1.0.22, and if it matches, it
replaces the calls to `libusb_set_debug` with equivalent calls to
`libusb_set_option`.
2019-02-01 21:31:57 -08:00
..
util Update calls to libusb_set_debug 2019-02-01 21:31:57 -08:00
Makefile.am Add SPDX license identifiers in all files 2018-04-18 12:19:29 -07:00
README.md Reorganize source layout 2017-07-27 17:56:51 -07:00
libusbx52.h Add SPDX license identifiers in all files 2018-04-18 12:19:29 -07:00
usb_x52_stub.c Update calls to libusb_set_debug 2019-02-01 21:31:57 -08:00

README.md

LibUSB mocker library

This folder contains a convenience library to mock the API of libusb. This is intended to be used as an LD_PRELOAD library when used by automated tests to verify the library without needing actual hardware to verify the tests.

While a manual test using real hardware is valuable, running some automated tests in an environment where the hardware is not available is equally valuable, especially if the source code is changing frequently.

Note that the API exported by the mocker is limited to the API used by libx52, as writing a complete USB simulator stack in software is not an easy job, nor is it necessary for the purposes of this project.