Hello,
I have a program including debug stdio screen display. I would like to have
this feature, when stdio is connected, program will send some parameters to
stdio, otherwise, no information is sent, do I have possibility to detect stdio
(like DC10.72) connected by program?
thanks
STDIO DISPLAY ON BL4S200
Started by ●August 17, 2016
Reply by ●August 17, 20162016-08-17
If nothing's connected, it shouldn't matter that you're still
sending output to STDIO.
If you're using the Rabbit's built-in methods to redirect STDIO to a serial port, then I don't think there will be an easy way to conditionally send output. You'd probably have to create a wrapper for printf() that checks an I/O pin (CTS on the serial port?) before handing the parameters off to vprintf() using a va_list parameter.
-Tom
On Aug 17, 2016, at 10:36 AM, y...@omniverter.com [rabbit-semi] wrote:
> Hello,
>
> I have a program including debug stdio screen display. I would like to have this feature, when stdio is connected, program will send some parameters to stdio, otherwise, no information is sent, do I have possibility to detect stdio (like DC10.72) connected by program?
>
> thanks
>
If you're using the Rabbit's built-in methods to redirect STDIO to a serial port, then I don't think there will be an easy way to conditionally send output. You'd probably have to create a wrapper for printf() that checks an I/O pin (CTS on the serial port?) before handing the parameters off to vprintf() using a va_list parameter.
-Tom
On Aug 17, 2016, at 10:36 AM, y...@omniverter.com [rabbit-semi] wrote:
> Hello,
>
> I have a program including debug stdio screen display. I would like to have this feature, when stdio is connected, program will send some parameters to stdio, otherwise, no information is sent, do I have possibility to detect stdio (like DC10.72) connected by program?
>
> thanks
>
Reply by ●September 1, 20162016-09-01