-
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.
Answered by
badcel
May 9, 2023
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. If you experience problems with the library let me know. Any feedback is welcome. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sdeluca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.