abcminiuser / lufa

LUFA - the Lightweight USB Framework for AVRs.
http://www.lufa-lib.org
1.04k stars 325 forks source link

Switched HID Host App to hidapi instead of libusb #82

Open NicoHood opened 8 years ago

NicoHood commented 8 years ago

Makes things a lot simpler, the older libusb option is still kept though. sudo apt-get install libhidapi*

See the single commits, the 2nd is just for correct github indention.

abcminiuser commented 7 years ago

HIDAPI isn't supported in the (modified) Teensy CLI loader app - compilation doesn't work without libUSB as there's no HIDAPI fallback. Did you perhaps use a different version of the app modified somewhere else?

Closing for now - please re-open if you have a full patch with the HIDAPI backend.

NicoHood commented 7 years ago

I do not really understand what you mean? HIDAPI has libusb as dependency, yes. But the HID API is simpler and easier to use.

abcminiuser commented 7 years ago

HIDAPI is probably a better solution to generic LibUSB code, but I thought there was more to it than just changing -DUSE_LIBUSB to -DUSE_HIDAPI like your proposed patch does. I did try compiling it locally and got compile errors - have you forked the HIDLoaderApp source code to include new code paths to use HIDAPI that weren't included in this PR perhaps?

NicoHood commented 7 years ago

Hu? Sure I edited hid_bootloader_cli.c which is part of the PR. I've compiled it on ubuntu 14 at that time. I have not tried it again and I currently have no hardware and time to test. Sorry.

abcminiuser commented 7 years ago

Whoopsiedaisy - the diff to hid_bootloader_cli.c was so large GitHub was hiding it by default, which confused me 😞. I'll do a proper re-review of this.