Adress from aserial device ....

I d’like to use the adress from a serial device in a C-Program. Could
somebody show me c-function to get the adress for /dev/serxy ??
I’m using QNX 4.25 with Watcom 10.6.

Greetings
Markus Brun

Markus Brun <markus.brun@pup.ch> wrote:

I d’like to use the adress from a serial device in a C-Program. Could
somebody show me c-function to get the adress for /dev/serxy ??
I’m using QNX 4.25 with Watcom 10.6.

What do you mean by “use the address” for a serial device? Are you talking
a direct inp/outp to the port? This isn’t really recommended – Dev.ser
should handle all of that, and you just deal with the serial port using
read()/write()/qnx_ioctl()/tcsetattr() and other such C library routines.
Also, Dev.ser will NOT expect you to be talking to the hardware directly,
and this can cause bugs or inconsistent behaviour from Dev.ser.

Or, are you trying to write a driver? If so, you can download the source
to Dev.ser from ftp.qnx.com:/usr/free (and down a few directories), our
support site can probably find it with a search as well.

To give a better answer, I’d really have to know what you are trying
to achieve (final goal) rather than the very specific question you
asked. (The specific question tends to suggest that you are trying
to do something in a non-QNX way, which is why it may be difficult
to give you a good answer.)

-David