SERIAL_USB and buffering.

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

SERIAL_USB and buffering.

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SERIAL_USB and buffering.

Post 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
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: SERIAL_USB and buffering.

Post 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... :-(
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SERIAL_USB and buffering.

Post by Giovanni »

The trick is to not use the forum search, use Google with site:chibios.com, way better.

Giovanni
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: SERIAL_USB and buffering.

Post by RoccoMarco »

I'll improve forum search soon.
Post Reply