Ihor Dutchak
Ihor Dutchak
> hid_read operating from its own thread and hid_write from the main thread are causing a race condition On macOS that is totally safe.
> I see. In that case, is the whole calling hid_write from a different thread to avoid stalls not a very good idea to begin with...? (I would very much...
> Does that include hid_write? My suggestion is to have two separate working threads (in addition to main thread): one for hid_read, and one for all other calls.
> I'll see what I can get working and report back if I make any useful findings. Any findings?
use `hid_enumerate` with `(0, 0)` VID/PID - it will give you all the devices, so you can filter that list on your own.
Not repeatedly. Enumerate once - search/filter all the devices you need in that list.
I'm confused. Checking for hotplug/unplug events is entirely different problem, then you originally described (finding multiple devices with a single `hid_enumerate`).
And how passing multiple VIDs/PIDs into hid_enumerate help with "audio clicks" each time you call it?
Very good point from Tod. Thanks for the explanation @FabianKopp, I think I understand your problem now. > it executes getDescriptor requests on every single usb device 1) So I...
I'm asking, because I was thinking a more general aproach: enumerate function, that accepts a filter function over devices attrigutes (or even over a hid_device_info), but I guess it wouldn't...