什么是最好的usb库与Windows上的usb HID设备通信?
图书馆应该;
- 易于使用,少数几行客户端代码应该完成许多目的
- 可能。 (如果将来使用其他平台的端口)
- C ++绑定。
- 成熟且稳定
的
-Be easy to use and few lines of client code should accomplish much
-Be as platform independent as possible. (In case of future ports to other platforms)
-Have C++ bindings.
-Be mature and stable
我也希望通过回呼通知大多数HID事件。
I would also like to be notified of most HID events through callbacks.
我考虑了以下替代方法:
I have considered the following alternatives:
* libhid - (遗憾?)这是GPL,不能在我的应用程序中使用。
$
* WDK - 似乎对我有用。我不需要那种控制
* atusbhid - 这有一个适当的抽象层次,但牢固绑定到Windows消息环路
*libhid - (Unfortunately?) this is GPL and cannot be used in my application.
*WDK - Seems to be a bit low-level for my use. I don`t need that kind of control
*atusbhid - This has an appropriate level of abstraction but is firmly tied to the windows messaging loop
您有任何其他选择吗?
看看 hidapi :它是C,它回答了C ++绑定问题(有效地:)),是跨平台,并有一个非常宽松的许可证。似乎没有回调,但...
Take a look at hidapi: it is C, which answers the C++ bindings question (effectively :)), is cross platform and has a very permissive license. Doesn't appear to have the callbacks, but...