From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5921 invoked by alias); 3 May 2007 04:34:26 -0000 Received: (qmail 5913 invoked by uid 22791); 3 May 2007 04:34:25 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.lvl7.com (HELO lvl7-trend01.lvl7.com) (66.192.95.83) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 May 2007 04:34:23 +0000 Received: from lvl7in-mail01.lvl7.com ([10.240.1.18]) by lvl7-trend01.lvl7.com with InterScan VirusWall; Thu, 03 May 2007 00:34:20 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 03 May 2007 04:34:00 -0000 Message-ID: From: "Venkateswara Rao L." To: "Venkateswara Rao L." , X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: RE: [ECOS] ttydiag read and write to console X-SW-Source: 2007-05/txt/msg00016.txt.bz2 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,=20 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" =20=20=20=20 Please find the code sample --------------------------------------------------------- Char buff[] =3D "\nPlease enter some data: "; retval =3D cyg_io_lookup("/dev/ttydiag", &handle); if (retval !=3D NOERR) { printf("io lookup error: %d\n", retval); return; } len =3D strlen(buff); cyg_io_write(handle, buff, &len); retval =3D cyg_io_read(handle,bufRead,&in_msglen); if (retval !=3D NOERR)=20 { 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=20 --------------------------------------------------------- Please enter some data: --------------------------------------------------------- After that what ever I entering it is not echoing and hanged. Please help me. Warm Regards L. Venkateswara Rao. --=20 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