mirror of https://github.com/nirenjan/libx52.git
This removes the earlier work done in libx52 to support USB hotplug. This wasn't adequately tested, and the reason to have hotplug support was to address perceived deficiencies in the standard API. However, on recent reflection and experimentation, it seems to be easier to support adding methods to connect to an X52/X52Pro joystick dynamically after initializing the library. This approach also lends itself to adding checks when sending control packets to close the device handle when it detects device disconnection. Also, one could add a disconnect method to disconnect from any connected joysticks. Finally, this commit reverts a series of commits that chronicled my journey into implementing hotplug support and simulating it in libusbx52. By coalescing the revert into a single commit, it makes it easier to revert the revert in the future, if necessary. |
||
---|---|---|
.. | ||
util | ||
Makefile.am | ||
README.md | ||
libusbx52.h | ||
usb_x52_stub.c |
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.