SPB_CONTROLLER_CONFIG structure (spbcx.h)

The SPB_CONTROLLER_CONFIG structure contains the configuration settings for an SPB controller driver.

Syntax

typedef struct _SPB_CONTROLLER_CONFIG {
  ULONG                       Size;
  WDF_IO_QUEUE_DISPATCH_TYPE  ControllerDispatchType;
  WDF_TRI_STATE               PowerManaged;
  PFN_SPB_TARGET_CONNECT      EvtSpbTargetConnect;
  PFN_SPB_TARGET_DISCONNECT   EvtSpbTargetDisconnect;
  PFN_SPB_CONTROLLER_LOCK     EvtSpbControllerLock;
  PFN_SPB_CONTROLLER_UNLOCK   EvtSpbControllerUnlock;
  PFN_SPB_CONTROLLER_READ     EvtSpbIoRead;
  PFN_SPB_CONTROLLER_WRITE    EvtSpbIoWrite;
  PFN_SPB_CONTROLLER_SEQUENCE EvtSpbIoSequence;
} SPB_CONTROLLER_CONFIG, *PSPB_CONTROLLER_CONFIG;

Members

Size

The size, in bytes, of this structure. The SpbDeviceInitialize method uses this parameter value to determine which version of the structure is being used.

ControllerDispatchType

The dispatch type of the I/O queue for the controller driver. Set this member to either WdfIoQueueDispatchSequential or WdfIoQueueDispatchParallel, but not to WdfIoQueueDispatchManual. The SPB_CONTROLLER_CONFIG_INIT function initializes this member to its default value, WdfIoQueueDispatchSequential. For more information about these dispatch types, see Example Uses of I/O Queues.

A controller driver that operates in subordinate mode should set this member to WdfIoQueueDispatchParallel. For example, an I2C controller might be attached as a peripheral device to an SPI bus. This device acts as a master on the I2C bus, but is a subordinate on the SPI bus.

PowerManaged

Whether the I/O queue for the controller driver should be power-managed. Set this member to WdfTrue to indicate that the queue should be power-managed. Set this member to WdfFalse to indicate that the queue should not be power-managed. If this member is set to WdfDefault, the queue will be power-managed unless the driver calls the WdfFdoInitSetFilter method, which identifies the caller as an upper-level or lower-level filter driver. The SPB_CONTROLLER_CONFIG_INIT function initializes this member to WdfDefault.

When I/O requests are available in a power-managed queue, the framework delivers the requests to the driver only if the device is in its working (D0) state. For more information, see Power Management for I/O Queues.

EvtSpbTargetConnect

A pointer to the EvtSpbTargetConnect callback function. This function is implemented by the SPB controller driver. The EvtSpbTargetConnect member is optional and can be NULL.

EvtSpbTargetDisconnect

A pointer to the EvtSpbTargetDisconnect callback function. This function is implemented by the SPB controller driver. The EvtSpbTargetDisconnect member is optional and can be NULL.

EvtSpbControllerLock

The pointer to the EvtSpbControllerLock callback function. This function is implemented by the SPB controller driver. The EvtSpbControllerLock member is optional and can be NULL. For more information about the EvtSpbControllerLock function, see Handling Client-Implemented Sequences.

EvtSpbControllerUnlock

A pointer to the EvtSpbControllerUnlock callback function. This function is implemented by the SPB controller driver. This member is optional and can be NULL. For more information about the EvtSpbControllerUnlock function, see Handling Client-Implemented Sequences.

EvtSpbIoRead

A pointer to the EvtSpbControllerIoRead callback function. This function is implemented by the SPB controller driver. This member is not optional and must not be NULL.

EvtSpbIoWrite

A pointer to the EvtSpbControllerIoWrite callback function. This function is implemented by the SPB controller driver. This member is not optional and must not be NULL.

EvtSpbIoSequence

A pointer to the EvtSpbControllerIoSequence callback function. This function is implemented by the SPB controller driver. This member is not optional and must not be NULL.

Remarks

The SpbDeviceInitialize method uses the information in this structure to complete the initialization of the SPB controller. Before passing this structure to SpbDeviceInitialize, call the SPB_CONTROLLER_CONFIG_INIT function to initialize the members of this structure to their default values, and, as needed, overwrite these default values with information that is specific to your SPB controller driver.

Requirements

Requirement Value
Minimum supported client Supported starting with Windows 8.
Header spbcx.h

See also