[ECOS] Using the second serial port on ARM-E7T

Jonathan Larmour jlarmour@redhat.com
Mon Apr 15 10:48:00 GMT 2002


Jacques Ehrlich wrote:
> 
> >I tried something like :
> > fp = fopen("/dev/ser0", "rw");
> > ...
> > fprintf(fp, "hello\n");
> > ...
> >
> > without success.
> 
> Finally, it works !
> The error was :
> fp = fopen("/dev/ser0", "rw")
> 
> To be ok you must open two different "files":
> out = fopen("/dev/ser0", "w")
> in = fopen("/dev/ser0", "r")

Actually that shouldn't be required. But you saying this has made me notice
what the problem is: it shouldn't be "rw", it should be "r+" to open for
reading and writing.

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

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list