-
Notifications
You must be signed in to change notification settings - Fork 332
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
Switched HID Host App to hidapi instead of libusb #82
base: master
Are you sure you want to change the base?
Conversation
@@ -7,7 +7,8 @@ ifeq ($(OS), LINUX) # also works on FreeBSD | |||
CC ?= gcc | |||
CFLAGS ?= -O2 -Wall | |||
hid_bootloader_cli: hid_bootloader_cli.c | |||
$(CC) $(CFLAGS) -s -DUSE_LIBUSB -o hid_bootloader_cli hid_bootloader_cli.c -lusb | |||
#$(CC) $(CFLAGS) -s -DUSE_LIBUSB -o hid_bootloader_cli hid_bootloader_cli.c ../AES/aes.c -lusb | |||
$(CC) $(CFLAGS) -s -DUSE_HIDAPI -o hid_bootloader_cli hid_bootloader_cli.c ../AES/aes.c -I/usr/include/hidapi/ -lhidapi-libusb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this new AES source file come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good point. That was because I modified the Host app. You have to remove it of course.
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. |
I do not really understand what you mean? HIDAPI has libusb as dependency, yes. But the HID API is simpler and easier to use. |
HIDAPI is probably a better solution to generic LibUSB code, but I thought there was more to it than just changing |
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. |
Whoopsiedaisy - the diff to |
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.