I/O Access

1)Does anyone know how to use in8() and out8() in qnx?
2)Can I use these functions to read and write
data from I/O port?
3)In QNX 6.2 library,
uint8_t in8(uintptr_t port);
what 's the meaning of unintptr and uint8_t?
4)Is in8() and out() same with _inp() and
_outp() function in Visual C++?

Tie Hu
6/10

tie <tie@cbis.ece.drexel.edu> wrote:

Answered elsewhere in detail.

1)Does anyone know how to use in8() and out8() in qnx?

Yes. Need ThreadCtl() first.

2)Can I use these functions to read and write
data from I/O port?

Yes, that’s what they’re for.

3)In QNX 6.2 library,
uint8_t in8(uintptr_t port);
what 's the meaning of unintptr and uint8_t?

Returns unsigned 8-bit value, takes a pointer to an unsigned integer
(i.e. an address) as a parameter.

4)Is in8() and out() same with _inp() and
_outp() function in Visual C++?

Essentially, yes.

See /usr/include/x86/inout.h for more detail of x86 implementation.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.