Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 8

mmap_device_io()

Gain access to a device's registers

Synopsis:

#include <stdint.h>
#include <sys/mman.h>

uintptr_t mmap_device_io( size_t len,
                          uint64_t io );

Arguments:

len
The number of bytes of device I/O memory that you want to access. It can't be 0.
io
The address of the area that you want to access.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The mmap_device_io() function maps len bytes of device I/O memory at io and makes it accessible via the in*() and out*() functions in <hw/inout.h>.

Returns:

A handle to the device's I/O memory, or MAP_DEVICE_FAILED if an error occurs (errno is set).

Errors:

EINVAL
Invalid flags type, or len is 0.
ENOMEM
The address range requested is outside of the allowed process address range, or there wasn't enough memory to satisfy the request.
ENXIO
The address from io for len bytes is invalid.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Caveats:

You need I/O privileges to use the result of the mmap_device_io() function. The calling thread may call ThreadCtl() with the _NTO_TCTL_IO command to establish these privileges.

See also:

mmap(), mmap_device_memory(), munmap_device_io()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 151

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/m/mmap_device_io.html on line 151