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/p/pci_write_config.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/p/pci_write_config.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/p/pci_write_config.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/p/pci_write_config.html on line 8

pci_write_config()

Write to the configuration space of a PCI device

Synopsis:

#include <hw/pci.h>

int pci_write_config( void* handle,
                      unsigned offset,
                      unsigned count,
                      size_t size,
                      const void* buff );

Arguments:

handle
The handle returned by pci_attach_device().
offset
The offset into the configuration space where you want to write the data.
count
The number of objects that you want to write.
size
The size of each object.
buff
A pointer to the data that you want to write.

Library:

libc

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

Description:

The pci_write_config() function writes count objects of the specified size from buff at the given offset to the configuration space of the PCI device specified by handle.


Note: You must successfully call pci_attach() before calling any of the other PCI functions.

Returns:

PCI_BAD_REGISTER_NUMBER
The offset specified is invalid.
PCI_BUFFER_TOO_SMALL
The size argument is too large.
PCI_SET_FAILED
An error occurred writing to the configuration space of the device.
PCI_SUCCESS
Success.
PCI_UNSUPPORTED_FUNCT
This device doesn't support writing to its configuration space.
-1
You haven't called pci_attach(), or the call to it failed.

Classification:

QNX Neutrino

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

See also:

pci_attach(), pci_attach_device(), pci_detach(), pci_detach_device(), pci_find_class(), pci_find_device(), pci_present(), pci_read_config(), pci_read_config8(), pci_read_config16(), pci_read_config32(), pci_rescan_bus(), pci_write_config8(), pci_write_config16(), pci_write_config32()


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/p/pci_write_config.html on line 190

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/p/pci_write_config.html on line 190