Bewerken

Delen via


SPB_TRANSFER_DIRECTION enumeration (spb.h)

The SPB_TRANSFER_DIRECTION enumeration describes the direction (read or write) of a single transfer in an I/O transfer sequence.

Syntax

typedef enum SPB_TRANSFER_DIRECTION {
  SpbTransferDirectionNone,
  SpbTransferDirectionFromDevice,
  SpbTransferDirectionToDevice,
  SpbTransferDirectionMax
}  *PSPB_TRANSFER_DIRECTION;

Constants

 
SpbTransferDirectionNone
The data transfer direction is undefined.
SpbTransferDirectionFromDevice
The data transfer direction is from the device to system memory (read from device).
SpbTransferDirectionToDevice
The data transfer direction is from system memory to the device (write to device).
SpbTransferDirectionMax
Reserved for use by the operating system.

Remarks

The values in this enumeration indicate the directions of the individual transfers in an I/O transfer sequence. The input buffer for an IOCTL_SPB_EXECUTE_SEQUENCE I/O control request is an SPB_TRANSFER_LIST structure that specifies a list of transfers for the sequence. Each transfer is described by an SPB_TRANSFER_LIST_ENTRY structure that contains the transfer parameters, which include the transfer direction. The transfer direction is SpbTransferDirectionFromDevice for a read operation, and is SpbTransferDirectionToDevice for a write operation.

Your SPB controller driver can call the SpbRequestGetParameters method to retrieve a set of SPB-specific parameters from an I/O request. One of these parameters is an SPB_TRANSFER_DIRECTION enumeration value that indicates the transfer direction of the previous I/O request. The SPB controller driver can use this direction value to determine whether the current read or write (IRP_MJ_READ or IRP_MJ_WRITE) request requires a change in transfer direction on the bus.

In addition, SpbRequestGetParameters retrieves a position value that indicates the relative position of a read or write request in the list of transfers for the multiple-request sequence. If a read request or a write request has a position value of SpbRequestSequencePositionSingle or SpbRequestSequencePositionFirst, the direction value for the previous transfer is SpbTransferDirectionNone (that is, there is no previous transfer direction). For a read or write request that has a position value of SpbRequestSequencePositionMiddle or SpbRequestSequencePositionLast, the direction value indicates whether the previous transfer was a read or a write. For an unlock (IOCTL_SPB_UNLOCK_CONTROLLER) request, which has a position value of SpbRequestSequencePositionLast, the direction value indicates whether the last transfer in the sequence was a read or a write.

A lock (IOCTL_SPB_LOCK_CONTROLLER) request has no previous direction. Similarly, an I/O control request that is passed to the EvtSpbControllerIoOther callback function has no previous direction. For either of these requests, the previous direction value retrieved by SpbRequestGetParameters is SpbTransferDirectionNone.

Requirements

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

See also