Help with using 'mmap_device_io'

I’m writing a test app to talk to a commercial PC-104 card directly. (Later
I will turn this in to a resource manager).
I use ‘mmap_device_io’ to supposedly map the device into the process space.
I assume that the ‘uintptr_t’ data type returned by ‘map_device_io’ is then
a pointer that I use to talk to the hardware. Therefore pseudo-code would
look like this…

ThreadCtl(_NTO_TCTL_IO, 0);
memptr=mmap_device_io(MAPSIZE, BASE_ADDR);

out16(memptr,dataword);

This seems to work. However, the following also appears to work

ThreadCtl(_NTO_TCTL_IO, 0);
memptr=mmap_device_io(MAPSIZE, BASE_ADDR);

out16(BASE_ADDR,dataword);

So please help me understand. What does the mmap_device_io() function call
do for me. Why does the statement ‘out16(BASE_ADDR,dataword);’ also appear
to work?

Answered in newuser conference.

“Chris Rose” <chris.rose@viasat.com> wrote in message
news:9v56p3$sq8$1@inn.qnx.com

I’m writing a test app to talk to a commercial PC-104 card directly.
(Later
I will turn this in to a resource manager).
I use ‘mmap_device_io’ to supposedly map the device into the process
space.
I assume that the ‘uintptr_t’ data type returned by ‘map_device_io’ is
then
a pointer that I use to talk to the hardware. Therefore pseudo-code would
look like this…

ThreadCtl(_NTO_TCTL_IO, 0);
memptr=mmap_device_io(MAPSIZE, BASE_ADDR);

out16(memptr,dataword);

This seems to work. However, the following also appears to work

ThreadCtl(_NTO_TCTL_IO, 0);
memptr=mmap_device_io(MAPSIZE, BASE_ADDR);

out16(BASE_ADDR,dataword);

So please help me understand. What does the mmap_device_io() function call
do for me. Why does the statement ‘out16(BASE_ADDR,dataword);’ also appear
to work?

\