From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21375 invoked by alias); 22 Aug 2006 15:42:51 -0000 Received: (qmail 21132 invoked by uid 22791); 22 Aug 2006 15:42:48 -0000 X-Spam-Check-By: sourceware.org Received: from tomts5.bellnexxia.net (HELO tomts5-srv.bellnexxia.net) (209.226.175.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Aug 2006 15:42:44 +0000 Received: from smtp1.sympatico.ca ([209.226.175.18]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with SMTP id <20060822154242.EDSN18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca>; Tue, 22 Aug 2006 11:42:42 -0400 X-Mailer: Openwave WebEngine, version 2.8.6.6 (webedge20-101-174-112-20020617)" From: Andre-John Mas To: Andre-John Mas ,Andrew Lunn CC: Date: Tue, 22 Aug 2006 15:42:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20060822154242.EDSN18394.tomts5-srv.bellnexxia.net@smtp1.sympatico.ca> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: Re: [ECOS] Problems with tcgetattr() X-SW-Source: 2006-08/txt/msg00209.txt.bz2 Just wanted to add a small correction, based on further tests: If you set the 'Default console device' to be '/dev/termios0', or any other termios compatible device, then your code can quite happily do tcgetattr() on 'STDIN_FILENO', since it is now mapped to the termios device. At least, this is how it is working for me :) Andre Andre-John Mas wrote: > > I got it working finally :) > > For the benefit of others, the following posting helped: > > http://ecos.sourceware.org/ml/ecos-discuss/2002-07/msg00092.html > > to quote the relavent instructions: > > 1) In the "Serial device drivers" section, I enabled the "TTY-mode serial device drivers" subsection (CYGPKG_IO_SERIAL_TTY = 1). > 2) In the "TTY-mode serial device drivers" subsection, I enabled the "TTY-mode channel #0" subsection (CYGPKG_IO_SERIAL_TTY_TTY0 = 1). > 3) In the "TTY-mode channel #0" subsection, I specified "TTY-mode device channel #0 device" as "/dev/ser0" (CYGDAT_IO_SERIAL_TTY_TTY0_DEV = "/dev/ser0") > 4) I also did 2 and 3 for "TTY-mode channel #1" subsection, but this may not be necessary > 5) Check the "Hardware serial device drivers" sections thoroughly to make sure they are what you want for /dev/ser0 (and /dev/ser1 maybe) > 6) In the "ISO C Library" section, "ISO C Library standard input/output functions" subsection, I specified "Default console device" to be "/dev/tty0" (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE = "/dev/tty0") > > in addition to this I activated the value > > CYGDAT_IO_SERIAL_POWERPC_QUICC_SMC_SMC1 > > and set the device name to > > "/dev/ser0" > > Step 6 above I used '/dev/termios0', instead of '/dev/tty0'. I then in my source code referred to '/dev/termios0' as suggested by Andrew. > > Andre > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss