Synopsis
typedef struct {
  unsigned char mode;
  unsigned char width;
  unsigned short idle;
  unsigned short options;
  unsigned long speed;
} CTL_SPI_PROTOCOL_t;
Description

CTL_SPI_PROTOCOL_t defines the protocol that an SPI device is configured for, or the current configuration of the SPI bus.

Structure
mode
Operating mode of the SPI bus, 0 through 3.
width
Width of one frame over the SPI bus. Some SPI drivers support only fixed frame widths, or a subset of frame widths, so refer to the documentation of your device to determine the supported frame widths.
idle
Either 0 or 0xffff which indicates the state MOSI is driven to when reading from the SPI bus. Some SPI devices require that MOSI is driven either high or low when reading from the bus.
options
Additional options private to the SPI driver. Typically this is used for storing DMA configuration.
speed
The operating speed of the SPI bus or SPI device, in hertz.