startup_io_map()

Gain access to a port or memory-mapped device.

Synopsis:

uintptr_t startup_io_map(unsigned size, paddr_t phys)

Arguments:

size
The number of bytes of device I/O memory that you want to access. It may not be 0.
phys
The physical address of the area that you want to access.

Description:

This function is used to gain access to a device or port:

ARM
Map a device's physical memory into a process's address space. This is the same functionality as that provided by the mmap_device_memory() in the C library.
x86
Provide access to an I/O port. This is the same functionality as that provided by as mmap_device_io() function in the C library.
Note: Use the value returned by startup_io_map() while the startup program is running. After startup has completed, use the value returned by callout_io_map().

Returns:

The startup_io_map() function returns values like those returned by the in*() and out*() functions in the C library (see the QNX Neutrino C Library Reference).