SPIDRV_Init Struct Reference

An SPI driver instance initialization structure.

#include <spidrv.h>

Data Fields

void * port
The USART used for SPI.
uint8_t portLocation
A location number for SPI pins.
uint32_t bitRate
An SPI bitrate.
uint32_t frameLength
An SPI framelength, valid numbers are 4..16.
uint32_t dummyTxValue
The value to transmit when using SPI receive API functions.
SPIDRV_Type_t type
An SPI type, master or slave.
SPIDRV_BitOrder_t bitOrder
A bit order on the SPI bus, MSB or LSB first.
SPIDRV_ClockMode_t clockMode
SPI mode, CLKPOL/CLKPHASE setting.
SPIDRV_CsControl_t csControl
A select master mode chip select (CS) control scheme.
SPIDRV_SlaveStart_t slaveStartMode
A slave mode transfer start scheme.

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

Field Documentation

port

void* SPIDRV_Init::port

The USART used for SPI.

portLocation

uint8_t SPIDRV_Init::portLocation

A location number for SPI pins.

bitRate

uint32_t SPIDRV_Init::bitRate

An SPI bitrate.

frameLength

uint32_t SPIDRV_Init::frameLength

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

dummyTxValue

uint32_t SPIDRV_Init::dummyTxValue

The value to transmit when using SPI receive API functions.

type

SPIDRV_Type_t SPIDRV_Init::type

An SPI type, master or slave.

bitOrder

SPIDRV_BitOrder_t SPIDRV_Init::bitOrder

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

clockMode

SPIDRV_ClockMode_t SPIDRV_Init::clockMode

SPI mode, CLKPOL/CLKPHASE setting.

csControl

SPIDRV_CsControl_t SPIDRV_Init::csControl

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

slaveStartMode

SPIDRV_SlaveStart_t SPIDRV_Init::slaveStartMode

A slave mode transfer start scheme.