## CMSIS SPI Driver Function Documentation

### ARM_SPI_GetVersion

ARM_DRIVER_VERSION ARM_SPI_GetVersion()

Get driver version.

Location: Driver_SPI.c:42

Return

ARM_DRIVER_VERSION

### ARM_SPI_GetCapabilities

ARM_SPI_CAPABILITIES ARM_SPI_GetCapabilities()

Get driver capabilities.

Location: Driver_SPI.c:47

Return

ARM_SPI_CAPABILITIES

### ARM_SPI_Initialize

int32_t ARM_SPI_Initialize(ARM_SPI_SignalEvent_t cb_event)

Initialize SPI Interface.

Location: Driver_SPI.c:52

Parameters

Direction | Name | Description
--- | --- | ---
in | cb_event | Pointer to ARM_SPI_SignalEvent

Return

execution_status

### ARM_SPI_Uninitialize

int32_t ARM_SPI_Uninitialize()

De-initialize SPI Interface.

Location: Driver_SPI.c:56

Return

execution_status

### ARM_SPI_PowerControl

int32_t ARM_SPI_PowerControl(ARM_POWER_STATE state)

Control SPI Interface Power.

Location: Driver_SPI.c:60

Parameters

Direction | Name | Description
--- | --- | ---
in | state | Power state

Return

execution_status

### ARM_SPI_Send

int32_t ARM_SPI_Send(const void * data, uint32_t num)

Start sending data to SPI transmitter.

Location: Driver_SPI.c:76

Parameters

Direction | Name | Description
--- | --- | ---
in | data | Pointer to buffer with data to send to SPI transmitter
in | num | Number of data items to send

Return

execution_status

### ARM_SPI_Receive

int32_t ARM_SPI_Receive(void * data, uint32_t num)

Start receiving data from SPI receiver.

Location: Driver_SPI.c:80

Parameters

Direction | Name | Description
--- | --- | ---
out | data | Pointer to buffer for data to receive from SPI receiver
in | num | Number of data items to receive

Return

execution_status

### ARM_SPI_Transfer

int32_t ARM_SPI_Transfer(const void * data_out, void * data_in, uint32_t num)

Start sending/receiving data to/from SPI transmitter/receiver.

Location: Driver_SPI.c:84

Parameters

Direction | Name | Description
--- | --- | ---
in | data_out | Pointer to buffer with data to send to SPI transmitter
out | data_in | Pointer to buffer for data to receive from SPI receiver
in | num | Number of data items to transfer

Return

execution_status

### ARM_SPI_GetDataCount

uint32_t ARM_SPI_GetDataCount()

Get transferred data count.

Location: Driver_SPI.c:88

Return

number of data items transferred

### ARM_SPI_Control

int32_t ARM_SPI_Control(uint32_t control, uint32_t arg)

Control SPI Interface.

Location: Driver_SPI.c:92

Parameters

Direction | Name | Description
--- | --- | ---
in | control | Operation
in | arg | Argument of operation (optional)

Return

common execution_status and driver specific spi_execution_status

### ARM_SPI_GetStatus

ARM_SPI_STATUS ARM_SPI_GetStatus()

Get SPI status.

Location: Driver_SPI.c:125

Return

SPI status ARM_SPI_STATUS

### ARM_SPI_SignalEvent

void ARM_SPI_SignalEvent(uint32_t event)

Signal SPI Events.

Location: Driver_SPI.c:129

Parameters

Direction | Name | Description
--- | --- | ---
in | event | SPI_events notification mask

Return

none