Share via


PciIdeXSetBusData routine

The PciIdeXSetBusData routine stores data in Buffer at an offset specified in ConfigDataOffset within the device's PCI configuration space.

Syntax

NTSTATUS PciIdeXSetBusData(
  _In_ PVOID DeviceExtension,
  _In_ PVOID Buffer,
  _In_ PVOID DataMask,
  _In_ ULONG ConfigDataOffset,
  _In_ ULONG BufferLength
);

Parameters

  • DeviceExtension [in]
    Contains a pointer to the device extension of the IDE controller.

  • Buffer [in]
    Contains a pointer to the buffer in which data from the device's PCI bus configuration space is written.

  • DataMask [in]
    Contains a data mask buffer that controls which bits of PCI bus configuration data are to be updated by PciIdeXSetBusData. The length of Datamask must be the same as the length of Buffer.

  • ConfigDataOffset [in]
    Specifies an offset into the PCI configuration data space where the data to be updated can be found.

  • BufferLength [in]
    Specifies the length in bytes of the buffer.

Return value

PciIdeXSetBusData returns STATUS_SUCCESS if the data in the device's PCI configuration space was successfully updated and STATUS_UNSUCCESSFUL data if the device's PCI configuration space could not be updated.

Remarks

PciIdeXSetBusData replaces each byte of current PCI data, beginning with the byte indicated by ConfigDataOffest, with the new data contained in Buffer. For each byte, those bits not indicated by the DataMask are left untouched. The ith byte of data that follows ConfigDataOffset, therefore, is updated as follows:

ConfigDataOffest[i] = 
    (ConfigDataOffest[i] & ~DataMask[i]) | (DataMask[i] & Buffer[i])

PciIdeXSetBusData completes a bitwise OR, one byte at a time, of the current PCI configuration space data with the new data in Buffer. For each byte, only the bits indicated by DataMask are updated. PciIdeXSetBusData then stores the result of the logical OR in the device's PCI configuration space.

Requirements

Target platform

Desktop

Header

Ide.h (include Ide.h)

Library

Pciidex.lib

See also

PciIdeXInitialize

PciIdeXGetBusData

 

 

Send comments about this topic to Microsoft