I got a segfault when using hid from a thread. After a lot of debugging, it turned out to be because hid_open() returns a pointer, and because the return type wasn't defined, ctypes assumed the value is a 32-bit int, so the wrong value was passed to hid_read(). I defined all the types and now it works fine. Here are the definitions, it you like:
I got a segfault when using hid from a thread. After a lot of debugging, it turned out to be because hid_open() returns a pointer, and because the return type wasn't defined, ctypes assumed the value is a 32-bit int, so the wrong value was passed to hid_read(). I defined all the types and now it works fine. Here are the definitions, it you like: