Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can MPSSE be re-written to use libusb-1.0 instead of libusb-0.1? #40

Open
majenkotech opened this issue Jun 1, 2016 · 5 comments
Open

Comments

@majenkotech
Copy link
Contributor

majenkotech commented Jun 1, 2016

It is a bit of a library nightmare having to have both libusb-1.0 and libusb-0.1 installed. It seems a bit of a stupid state of affairs that pic32prog needs them both, when one (0.1) is only needed for mpsse support. Is there something specific that mpsse needs from libusb-0.1 that libusb-1.0 doesn't provide? Can mpsse be re-written to use libusb-1.0 instead, so that we can drop the requirement of libusb-0.1 entirely?

@majenkotech
Copy link
Contributor Author

In answer: yes, it looks like it can - and it may end up cleaner because of it (better platform abstraction, better device probing, etc).

I have gone through and changed the libusb0 calls to libusb1 calls and made a number of other small changes (boards are now found in a LUT instead of hard coded in a list of ifs). It compiles. That's all I can say about it though since I have nothing to test it on.

I will drop it into a separate PR so you can try it out.

@majenkotech majenkotech changed the title Can MPSSE be re-written to use libusb-1.0 instead of libusb-0.9? Can MPSSE be re-written to use libusb-1.0 instead of libusb-0.1? Jun 1, 2016
@sergev
Copy link
Owner

sergev commented Jun 2, 2016

Great! I've also updated the Windows version. Still need to test it though.

@sergev
Copy link
Owner

sergev commented Jun 2, 2016

Technically, it's possible to get rid of libusb-1.0 as well, and use direct udev or IOHID API. May be someday in distant future.

@majenkotech
Copy link
Contributor Author

Well, since hidapi, which is used throughout the rest of the adapters, uses libusb-1.0, there's no point - we'll be linking it in anyway. So we may as well just stick with libusb-1.0... unless you want to drop hidapi too?

@sergev
Copy link
Owner

sergev commented Jun 2, 2016

Hidapi uses libusb only in Linux. Neither Windows nor MacOSX need it. By itself, hidapi is a pretty thin layer of code. It should be easy to integrate into the project and reduce the external dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants