-
I want to be able to seperately communicate to two individual MCP2221 devices |
Beta Was this translation helpful? Give feedback.
Answered by
smdn
Nov 18, 2024
Replies: 1 comment
-
Thanks for the question. You can choose the target MCP2221 from multiple HID devices by specifying the More specifically, the code would be as follows. // Select an HID device that contains the string "device-1" in its DevicePath.
await using var device1 = await MCP2221.OpenAsync(
findDevicePredicate: hidDevice => hidDevice.DevicePath.Contains("device-1")
);
// Select an HID device that contains the string "device-2" in its DevicePath.
await using var device2 = await MCP2221.OpenAsync(
findDevicePredicate: hidDevice => hidDevice.DevicePath.Contains("device-2")
); The |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MPstatus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the question.
You can choose the target MCP2221 from multiple HID devices by specifying the
findDevicePredicate
argument ofMCP2221.OpenAsync
.In this way, you can handle multiple MCP2221s separately.
More specifically, the code would be as follows.
The
DevicePath
…