Hi,
I'm confused about how to use multiple Teensys with RawHID on a host PC at the same time.
Would I simply open all the RawHID communication devices with a single call to rawhid_open() that would enumerate all the devices with the same vid, pid usage_page, and usage? And then use trial and error to figure out which Teensy RawHID is associated with which enumerated device?
Or, would I need to change the usage page and/or usage values in the header files each time I upload code to a particular Teensy, so that each Teensy has a unique usage_page/page value?
But then how would I use the rawhid_open()? Would I use rawhid_open() in a separate thread for each Teensy, and use the unique usage page and page values that I defined earlier?
Thanks in advance,
low
I'm confused about how to use multiple Teensys with RawHID on a host PC at the same time.
Would I simply open all the RawHID communication devices with a single call to rawhid_open() that would enumerate all the devices with the same vid, pid usage_page, and usage? And then use trial and error to figure out which Teensy RawHID is associated with which enumerated device?
Or, would I need to change the usage page and/or usage values in the header files each time I upload code to a particular Teensy, so that each Teensy has a unique usage_page/page value?
Code:
#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0480
#define RAWHID_USAGE_PAGE 0xFFAB // recommended: 0xFF00 to 0xFFFF
#define RAWHID_USAGE 0x0200 // recommended: 0x0100 to 0xFFFF
But then how would I use the rawhid_open()? Would I use rawhid_open() in a separate thread for each Teensy, and use the unique usage page and page values that I defined earlier?
Thanks in advance,
low
Last edited: