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.

sl_gpio_port_t

Tx port.

sl_gpio_port_t

Rx port.

sl_gpio_port_t

Clock port.

sl_gpio_port_t

Chip select port.

uint8_t

Tx pin.

uint8_t

Rx pin.

uint8_t

Clock pin.

uint8_t

Chip select pin.

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 159 of file platform/emdrv/spidrv/inc/spidrv.h

portTx#

sl_gpio_port_t SPIDRV_Init_t::portTx

Tx port.


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

portRx#

sl_gpio_port_t SPIDRV_Init_t::portRx

Rx port.


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

portClk#

sl_gpio_port_t SPIDRV_Init_t::portClk

Clock port.


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

portCs#

sl_gpio_port_t SPIDRV_Init_t::portCs

Chip select port.


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

pinTx#

uint8_t SPIDRV_Init_t::pinTx

Tx pin.


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

pinRx#

uint8_t SPIDRV_Init_t::pinRx

Rx pin.


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

pinClk#

uint8_t SPIDRV_Init_t::pinClk

Clock pin.


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

pinCs#

uint8_t SPIDRV_Init_t::pinCs

Chip select pin.


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

bitRate#

uint32_t SPIDRV_Init_t::bitRate

An SPI bitrate.


Definition at line 175 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 176 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 177 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 178 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 179 of file platform/emdrv/spidrv/inc/spidrv.h

clockMode#

SPIDRV_ClockMode_t SPIDRV_Init_t::clockMode

SPI mode, CLKPOL/CLKPHASE setting.


Definition at line 180 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 181 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 182 of file platform/emdrv/spidrv/inc/spidrv.h