[fpc-devel] ConsoleIO and flushing buffered output

Christo Crause christo.crause at gmail.com
Sun Jun 7 19:16:10 CEST 2020


I want to change the _haltproc for freertos ESP controllers to use normal
write/writeln functionality to send information to standard output.  On
these targets the output is typically buffered serial provided by the OS.
Text output written just prior to setting the cpu to sleep doesn't get
sent, hence a flush is needed to complete data transmission before putting
the cpu to sleep.  Looking at consoleio.OpenIO there doesn't seem to be a
convenient way to provide a flush helper function. Also the RTL Flush
procedure calls InOutFunc and not FlushFunc.

What is the proper way to hook a flush helper function into the existing
RTL infrastructure?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20200607/934a1343/attachment.htm>


More information about the fpc-devel mailing list