@wjasper Thanks for your work in putting together and sharing this comprehensive library. I found it to be a very useful reference to understand the workings of the underlying hardware interface on these USB devices.
I was initially hoping to use this code as a drop-in library, but encountered some obstacles in doing so.
Here are some suggestions to consider for possible improvements in that regard:
Many of the functions will invoke exit() on error. This is undesirable as it can bring down the whole application. Would prefer if it returned a defined set of error codes instead.
Many of the functions will invoke printf() and friends in various places. This is undesirable for some applications which need to control what gets printed to stdout/stderr. An option to suppress verbose debug output and error messages would be preferable.
return codes from libusb API calls are often not checked and/or not passed up to the application. This means that error conditions often cannot be detected and handled at application level.
I've tried to remove as many printf and friends a possible. Some are unavoidable. Tried to return as many libusb API calls as possible. Thanks for the suggestion.
@wjasper Thanks for your work in putting together and sharing this comprehensive library. I found it to be a very useful reference to understand the workings of the underlying hardware interface on these USB devices.
I was initially hoping to use this code as a drop-in library, but encountered some obstacles in doing so. Here are some suggestions to consider for possible improvements in that regard: