how do I have two classes(HID, CDC) alternatively in my application? #1428
Unanswered
nachiketathakur
asked this question in
Q&A
Replies: 1 comment
-
|
I don’t quite understand what you want to achieve. Do you want to have device dynamically enumerated as different class/type based on user action (or any code logic) ? If that is the case check out Configuration descriptor is what host and device agree to work together. If you want to change that when host ask when enumerating. After enumeration any changes required an detach/re-attach. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using RP2040(Pico Development Board).
In my application, I want to do something like this:
userInput;
tusb_init();
if (userInput == 0)
initialize_cdc_class();
if(userInput == 1)
initialize_hid_class();
Is it possible to do this? And is it the tud_task() which initializes the device stack as per descriptors or is it the tusb_init() ? If it is the tusb_init() then how can I make changes so that I can alternatively have two classes in the application?
Beta Was this translation helpful? Give feedback.
All reactions