* [ECOS] ttydiag read and write to console
@ 2007-05-02 14:38 Venkateswara Rao L.
0 siblings, 0 replies; 4+ messages in thread
From: Venkateswara Rao L. @ 2007-05-02 14:38 UTC (permalink / raw)
To: ecos-discuss
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [ECOS] ttydiag read and write to console
@ 2007-05-03 4:34 Venkateswara Rao L.
2007-05-03 6:45 ` Andrew Lunn
0 siblings, 1 reply; 4+ messages in thread
From: Venkateswara Rao L. @ 2007-05-03 4:34 UTC (permalink / raw)
To: Venkateswara Rao L., ecos-discuss
Hi some one please respond.
cyg_io_write() is working fine but cyg_io_read() is blocking, as
per the reference manual cyg_io_read() echoes but here it is not
echoing.
Please find the code below.
Warm Regards
L.Venkateswara Rao.
-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of
Venkateswara Rao L.
Sent: Wednesday, May 02, 2007 8:09 PM
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] ttydiag read and write to console
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
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <FE7FB54DCB7C6949A1D3F9FF22DA6C1353FDD4@lvl7in-mail01.lvl7.com>]
end of thread, other threads:[~2007-05-03 9:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-02 14:38 [ECOS] ttydiag read and write to console Venkateswara Rao L.
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
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).