public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] ttydiag read and write to console
       [not found] <FE7FB54DCB7C6949A1D3F9FF22DA6C1353FDD4@lvl7in-mail01.lvl7.com>
@ 2007-05-03  9:49 ` Andrew Lunn
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2007-05-03  9:49 UTC (permalink / raw)
  To: Venkateswara Rao L.; +Cc: eCos Disuss

On Thu, May 03, 2007 at 02:16:39PM +0530, Venkateswara Rao L. wrote:
> Andrew
>   Is there any IO Driver available in eCos which we can use it for
> interactive input? If there, could u please provide its details?
> 

as i said:

   Use the interrupt driver serial device driver for your platform.

Take a look at CYGPKG_IO_SERIAL_DEVICES

     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

^ 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, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2007-05-03  6:45 UTC (permalink / raw)
  To: Venkateswara Rao L.; +Cc: ecos-discuss

On Thu, May 03, 2007 at 10:04:17AM +0530, Venkateswara Rao L. wrote:
> 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.

ttydiag is a very simple, polled io driver. It is not really designed
for interactive input use. Use the interrupt driver serial device
driver for your platform.

       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

^ 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

* [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

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 --
     [not found] <FE7FB54DCB7C6949A1D3F9FF22DA6C1353FDD4@lvl7in-mail01.lvl7.com>
2007-05-03  9:49 ` [ECOS] ttydiag read and write to console Andrew Lunn
2007-05-03  4:34 Venkateswara Rao L.
2007-05-03  6:45 ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2007-05-02 14:38 Venkateswara Rao L.

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).