This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: EB40 Serial port #1 question.
- To: "Jonathan Larmour" <jlarmour at redhat dot com>
- Subject: RE: [ECOS] EB40 Serial port #1 question.
- From: <felixwong at i-technologies dot cc>
- Date: Thu, 11 Oct 2001 09:29:55 +0800
- Cc: <ecos-discuss at sources dot redhat dot com>
Now have no problem in output part using fprintf & other file operations.
What if I want to have a READ/WRITE device open?
use "r+w" instead of "rw" or "wr"?
FW
-----Original Message-----
From: jlarmour@worf.jifvik.org [mailto:jlarmour@worf.jifvik.org]On Behalf Of Jonathan Larmour
Sent: Wednesday, October 10, 2001 8:42 PM
To: felixwong@i-technologies.cc
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] EB40 Serial port #1 question.
felixwong@i-technologies.cc wrote:
>
> NOTE: The program below IS working on my EB40 fine.
> The modification I made was "wt" instead of "rw" in file open operation.
> Both "/dev/ser1" and "/dev/tty1" should work.
>
> Is there any problem with the "rw" case with "fopen"?? (note that
> "wr" case is working fine in this example too). Seems only the first
> character of file "mode" string is intepreted in eCos fileio.
Yes, because "rw" is not a legal mode string for fopen(). Try "r+".
I'm not clear though: with this fixed you would now have no problems at
all?
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine