-
Is it possible to use this library to subscribe to an event when data is received at the device? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This library only wraps the available HidApi api which does not offer any events. But you can probably set a Device into non blocking mode and asynchronously check for new data. If new data is received raise an event. HidApi docs: https://github.com/libusb/hidapi/blob/b516e970480a8d05b1c392d106ca110a9d06d668/hidapi/hidapi.h#LL372C13-L372C13 If you experience problems with the library let me know. Any feedback is welcome. |
Beta Was this translation helpful? Give feedback.
This library only wraps the available HidApi api which does not offer any events.
But you can probably set a Device into non blocking mode and asynchronously check for new data. If new data is received raise an event.
HidApi docs: https://github.com/libusb/hidapi/blob/b516e970480a8d05b1c392d106ca110a9d06d668/hidapi/hidapi.h#LL372C13-L372C13
If you experience problems with the library let me know. Any feedback is welcome.