From: "Venkateswara Rao L." <lvenkat@lvl7.com>
To: <ecos-discuss@ecos.sourceware.org>
Subject: [ECOS] ttydiag read and write to console
Date: Wed, 02 May 2007 14:38:00 -0000 [thread overview]
Message-ID: <FE7FB54DCB7C6949A1D3F9FF22DA6C1353FCDC@lvl7in-mail01.lvl7.com> (raw)
Hi all,
I want to work on ttydiag,
I am able to write to the terminal using "cyg_io_write"
But unable to read from the terminal with echo using "cyg_io_read"
Please find the code sample
---------------------------------------------------------
Char buff[] = "\nPlease enter some data: ";
retval = cyg_io_lookup("/dev/ttydiag", &handle);
if (retval != NOERR) {
printf("io lookup error: %d\n", retval);
return;
}
len = strlen(buff);
cyg_io_write(handle, buff, &len);
retval = cyg_io_read(handle,bufRead,&in_msglen);
if (retval != NOERR)
{
printf("Can't read data - DEVIO error: %d\n", retval);
while(1);/*Hang*/
return;
}
printf("Read %d bytes\n", in_msglen);
---------------------------------------------------------
I am able to see the output as shown
---------------------------------------------------------
Please enter some data:
---------------------------------------------------------
After that what ever I entering it is not echoing and hanged.
Please help me.
Warm Regards
L. Venkateswara Rao.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next reply other threads:[~2007-05-02 14:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 14:38 Venkateswara Rao L. [this message]
2007-05-03 4:34 Venkateswara Rao L.
2007-05-03 6:45 ` Andrew Lunn
[not found] <FE7FB54DCB7C6949A1D3F9FF22DA6C1353FDD4@lvl7in-mail01.lvl7.com>
2007-05-03 9:49 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FE7FB54DCB7C6949A1D3F9FF22DA6C1353FCDC@lvl7in-mail01.lvl7.com \
--to=lvenkat@lvl7.com \
--cc=ecos-discuss@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).