Skip to content

How to specify Device Interface # at connection/open? #434

Answered by Youw
drfrankencopter asked this question in Q&A
Discussion options

You must be logged in to vote

Should I be using hid_open_path(), and pulling the specific path the interface from the device_info struct I get from HID enumerate? I'm guessing this is the case, but if anyone can confirm that would be greatly appreciated.

That is correct.

some guidance on what not to do in multi-threaded applications that would also be helpful

  • Always syncronize enumeration/open/close of the device(s);
  • Always syncronize device-specific function calls (per-device);
  • hid_read is the only function that can be used asyncronous from other device-specific functions;

There're still some issues in some corner cases, but that is the best working solution as of right now.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drfrankencopter
Comment options

Answer selected by drfrankencopter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants