Page 1 of 1

SERIAL_USB and buffering.

Posted: Thu May 19, 2016 3:11 pm
by rew
Hi,

I have an application that used to work, except that now chibios has been updated stuff suddenly stopped working.... :-(

I have it almost working again, execept that my outputstream to SERIAL_USB is getting buffered where I don't want that. (if you type a character, I echo it back, it is not useful if that happens 3 minutes later).

How do I flush the SERIAL_USB output stream? Why do I have to do this explicitly now?

Re: SERIAL_USB and buffering.

Posted: Thu May 19, 2016 3:41 pm
by Giovanni
Look at the demos, there is a function to associate to the periodic callback in order to flush the buffer.

viewtopic.php?t=3246
viewtopic.php?t=3166

Giovanni

Re: SERIAL_USB and buffering.

Posted: Thu May 19, 2016 4:07 pm
by rew
Thank you.

Only 820 files with a total of 184 thousand Lines-Of-Code were changed between the version that worked and the current version. I searched for "flush" but didn't find anything... :-(

Re: SERIAL_USB and buffering.

Posted: Thu May 19, 2016 4:10 pm
by Giovanni
The trick is to not use the forum search, use Google with site:chibios.com, way better.

Giovanni

Re: SERIAL_USB and buffering.

Posted: Thu May 19, 2016 4:11 pm
by RoccoMarco
I'll improve forum search soon.