This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Echo on tty/serial...


On Thu, Sep 22, 2005 at 05:38:10PM +0200, Stefan Sommerfeld wrote:
> Hi,
> 
> I want to use the serial port from my eCos application. I tried to use 
> /dev/ttydiag, but i cannot disable the echo to the output. Every 
> cyg_io_read() causes the echo even if i disable it using tty_out_flags = 
> CYG_TTY_OUT_FLAGS_CRLF and tty_in_flags = 0. An important thing to know is, 
> that i'm using posix. Printf works flawless.
> 
> Is there another serial device which i could use (and have to enable for my 
> ecos)? How could it work if i also use printf?

Yes, use the "proper" serial driver. /dev/ttydiag is intended for
diagnostic output and is very simple. It does not support the various
flags needed to disable echos etc. 

Enabling CYGPKG_IO_SERIAL_DEVICES will cause the interrupt driver
serial driver to be built. This then provides /dev/ser?. You will want
to layer on top of that the tty driver. So enable
CYGPKG_IO_SERIAL_TTY_TTY0 and set CYGDAT_IO_SERIAL_TTY_CONSOLE to
/dev/tty0. You can then use the yg_io_set_config() calls as described
at
http://ecos.sourceware.org/docs-latest/ref/io-serial-driver-details.html.
If you want to use termio you need to add the termio driver to the
stack in the same way.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]