Bewerken

Delen via


SPB_MULTI_SPI_TRANSFER structure (spb.h)

The SPB_MULTI_SPI_TRANSFER structure describes a SPI I/O operation which is to be executed using a multi-SPI transfer mode such as Dual or Quad SPI.

Syntax

typedef struct SPB_MULTI_SPI_TRANSFER {
  SPB_MULTI_SPI_TRANSFER_HEADER Header;
  ULONG                         TransferPhaseCount;
  SPB_TRANSFER_LIST_ENTRY       TransferPhases[1];
} SPB_MULTI_SPI_TRANSFER, *PSPB_MULTI_SPI_TRANSFER;

Members

Header

A SPB_MULTI_SPI_TRANSFER_HEADER structure containing the parameters of the transfer.

TransferPhaseCount

The number of transfer phases present in the transfer structure. For a read operation, this should be set to 2 (representing a read phase, then a write phase). For a write operation, this should be set to 1 (representing solely a write phase).

TransferPhases[1]

An array of SPB_TRANSFER_LIST_ENTRY structures, representing the phases of the transfer.

Remarks

If this structure is used directly (rather than SPB_MULTI_SPI_WRITE_TRANSFER or SPB_MULTI_SPI_READ_TRANSFER), it must be initialized using the SPB_MULTI_SPI_TRANSFER_INIT helper function.

This structure (and the associated header) allows for the following to be specified:

  • Dual or quad SPI transfer modes.
  • One or two transfer phases - a write phase, followed by an optional read phase.
  • A variable number of bytes to be transmitted at the beginning of the write phase in single-SPI mode, before switching to the specified multi-SPI mode.
  • Where a read phase is provided, a variable number of wait cycles between write and read phases - clock cycles where no data is to be transferred.

The following restrictions apply to this structure:

  • The TransferPhases structure in the request must contain exactly one or two entries. The first entry describes a buffer that contains data to write to the device. The second, optional, entry describes a buffer used to hold data read from the device.
  • The direction of these TransferPhases should be set to SpbTransferDirectionToDevice and SpbTransferDirectionFromDevice respectively.
  • Each SPB_TRANSFER_LIST_ENTRY structure in the transfer list must specify a DelayInUs value of zero.

Requirements

Requirement Value
Header spb.h

See also