This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: diagnostic output to custom handler
- From: Bart Veer <bartv at ecoscentric dot com>
- To: Simon Kallweit <simon dot kallweit at intefo dot ch>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Wed, 24 Dec 2008 16:16:01 +0000
- Subject: Re: diagnostic output to custom handler
- References: <495245DF.4060708@intefo.ch>
>>>>> "Simon" == Simon Kallweit <simon.kallweit@intefo.ch> writes:
Simon> This patch adds the possibility to override the
Simon> diag_write_char function at run-time, allowing diagnostic
Simon> output to be redirected to a custom handler. I need this
Simon> functionality as I want the diagnostic output to be written
Simon> into a ring buffer in flash. I think this function may be
Simon> useful to others too?!?
What is the point of this, given that you can already insert your own
putc function using diag_init_putc()? The only gain appears to be that
your custom write_char function would not need to worry about
carriage return/linefeed handling, whereas a custom putc may need to
do so - depending on the output destination. That is not worth
imposing a bit more code and data bloat on everybody.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.