Skip to main content
This topic has been closed for replies.

4 replies

TDK
Aug 1, 2024 8:44 PM UTC

In general, yes, although the answer will depend on the terminal software. Some of them don't care, some of them need you to return the same settings it sent to you.

 

"If you feel a post has answered your question, please click ""Accept as Solution""."
MK..1
MK..1Author
Associate III
Aug 1, 2024 8:46 PM UTC

I am using python actually. Do you think it will matter with different python versions? Or on Linux/mac?

TDK
Aug 1, 2024 11:20 PM UTC

Yes, I do think it will matter.

And it's easy to do, so do it. That way you don't have to guess.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ST Technical Moderator
Aug 2, 2024 10:16 AM UTC

Hi @MK..1 

Here is another implementation to set LineCoding function 

 case CDC_SET_LINE_CODING:
 LineCoding.bitrate = (uint32_t)(pbuf[0] | (pbuf[1] << 8) |\
 (pbuf[2] << 16) | (pbuf[3] << 24));
 LineCoding.format = pbuf[4];
 LineCoding.paritytype = pbuf[5];
 LineCoding.datatype = pbuf[6];

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL