-
Notifications
You must be signed in to change notification settings - Fork 230
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
support Enumerate by (vid, pid)[] #116
base: master
Are you sure you want to change the base?
Conversation
Maybe i can't use Tuple, because it is too new. |
I agree that it would be useful to not need to provide a Usage ID to the Enumerate method. I think a simpler way to implement this would be adding a default value of 0 to the UsageID parameter on the existing method, and then consider 0 to mean "any usage". The documentation I found for HID Usage 0 seems to indicate that it would be valid to use it this way. |
@@ -0,0 +1,8 @@ | |||
namespace HidLibrary.unit |
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.
I've been away from active open-source C# development for a long time, so I may just be behind on naming conventions. What was the purpose for the "unit" namespace and why did you choose that name for this?
@@ -0,0 +1,8 @@ | |||
namespace HidLibrary.unit | |||
{ | |||
public class Tuple_VidPid |
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.
This is a really unwieldy name for this class, unless it adheres to a new C# convention I don't know about. It's not actually a tuple, since it's just a regular C# data object. It seems like something along these lines could be useful, but it should probably include a UsageID property and be called something like HidDeviceDescription
, and we should use it inside HidDevice
as well, possibly as the underlying data storage for the properties it describes.
RE: HID Usage Tables documentation: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf |
No description provided.