Newbie question regarding IO Manager
schirrmann at gmx.de
Fri May 4 13:45:25 UTC 2001
This should be quite an easy rtems newbie question for you, but I'm not
sure if I'm completely on the right way...
What I want is just to use rtems_io_write() for an output to one of my
uarts. I'm using Leon Sparc CPU, which uses termios.c for serial
I think I need to open the driver before writing to it. If yes, what
does the "arg" argument mean in rtems_io_open()? Just leaving it NULL
doesn't work. The leon uart wrapper just passes it to rtems_termios_open().
And that seems to expect a rtems_libio_open_close_args_t structure then.
But do I really need to do so much work, just to write some bytes to
the uart over driver system?
I'm doing the following:
rtems_io_open ( 0, 0, <arg> ); // What should arg be here?
rtems_io_write ( 0, 0, "hello");
rtems_io_close ( 0, 0, <arg> ); // ...and here?
The major/minor numbers are correct, the the correct routines in the
implementation of Leon are being called, the driver has been initialized and
printf() works correctly, which seems to use this functionality too.
So what additional efforts will I have to do? And is there some example code
out there using the IO Manager?
GMX - Die Kommunikationsplattform im Internet.
More information about the users