An SPI driver instance initialization structure.

Contains a number of SPIDRV configuration options. This structure is passed to SPIDRV_Init() when initializing a SPIDRV instance. Some common initialization data sets are predefined in Init Configuration Data.

Public Attributes#

void *

The USART used for SPI.

uint8_t

A location number for SPI pins.

uint32_t

An SPI bitrate.

uint32_t

An SPI framelength, valid numbers are 4..16.

uint32_t

The value to transmit when using SPI receive API functions.

An SPI type, master or slave.

A bit order on the SPI bus, MSB or LSB first.

SPI mode, CLKPOL/CLKPHASE setting.

A select master mode chip select (CS) control scheme.

A slave mode transfer start scheme.

Public Attribute Documentation#

port#

void* SPIDRV_Init_t::port

The USART used for SPI.


Definition at line 154 of file platform/emdrv/spidrv/inc/spidrv.h

portLocation#

uint8_t SPIDRV_Init_t::portLocation

A location number for SPI pins.


Definition at line 170 of file platform/emdrv/spidrv/inc/spidrv.h

bitRate#

uint32_t SPIDRV_Init_t::bitRate

An SPI bitrate.


Definition at line 172 of file platform/emdrv/spidrv/inc/spidrv.h

frameLength#

uint32_t SPIDRV_Init_t::frameLength

An SPI framelength, valid numbers are 4..16.


Definition at line 173 of file platform/emdrv/spidrv/inc/spidrv.h

dummyTxValue#

uint32_t SPIDRV_Init_t::dummyTxValue

The value to transmit when using SPI receive API functions.


Definition at line 174 of file platform/emdrv/spidrv/inc/spidrv.h

type#

SPIDRV_Type_t SPIDRV_Init_t::type

An SPI type, master or slave.


Definition at line 175 of file platform/emdrv/spidrv/inc/spidrv.h

bitOrder#

SPIDRV_BitOrder_t SPIDRV_Init_t::bitOrder

A bit order on the SPI bus, MSB or LSB first.


Definition at line 176 of file platform/emdrv/spidrv/inc/spidrv.h

clockMode#

SPIDRV_ClockMode_t SPIDRV_Init_t::clockMode

SPI mode, CLKPOL/CLKPHASE setting.


Definition at line 177 of file platform/emdrv/spidrv/inc/spidrv.h

csControl#

SPIDRV_CsControl_t SPIDRV_Init_t::csControl

A select master mode chip select (CS) control scheme.


Definition at line 178 of file platform/emdrv/spidrv/inc/spidrv.h

slaveStartMode#

SPIDRV_SlaveStart_t SPIDRV_Init_t::slaveStartMode

A slave mode transfer start scheme.


Definition at line 179 of file platform/emdrv/spidrv/inc/spidrv.h