- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i am using CDC ACM model,
i have SET_CONTROL_STATE: USB request in oder to control DTE/CTS signal,
how can i implement this requset?
any code snippet is there for SET_CONTROL_STATE?
regards,
geetha.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Geetha,
Please check with the following code-
case SET_CONTROL_STATE:
DTR=SETUPDAT[2] & 0x01;
RTS=SETUPDAT[2] & 0x02;
if(DTR|RTS)
{
/*code*/
}
break;
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Geetha,
You can add your required control function in the firmware when you receive request for SET_CONTROL_STATE in SETUPDAT register. Implementing a VIrtual COM port using FX2LP Application Note firmware can be used as a reference to implement the same. Please note that CTS signal is an input signal and cant be controlled by the host application.
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello sananya,
in the virtual com port with fx2lp example,SET_CONTROL_STATE doesnot contain any code.
we are consider only DTR signal here for data synchronisation.
how to recieve/access setup data register byte?which byte of setup data containing DTR bit?
regards,
geetha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Geetha,
You can check for the request type in the first byte of SETUPDAT, the third byte should have bit B0 set if DTR is asserted on the host side.
Best Regards,
Sananya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello sananya,
can you please send me the code snippet to check bit 0 status?
regards,
geetha.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Geetha,
Please check with the following code-
case SET_CONTROL_STATE:
DTR=SETUPDAT[2] & 0x01;
RTS=SETUPDAT[2] & 0x02;
if(DTR|RTS)
{
/*code*/
}
break;
Best Regards,
Sananya