2.114.4 SPIx_IsTransmitterBusy Function

C

/* x = SPI instance number */

/* SPI master (non-blocking) and client mode */

bool SPIx_IsTransmitterBusy (void);

Summary

Returns the transfer status of the SPI peripheral.

Description

This function returns the current transfer status of the last successful Write or Read request on the SPI peripheral. It can be used to check whether the SPI peripheral is still busy with a transfer or if the transfer has been completed.

Precondition

None.

Parameters

None.

Returns

ParamDescription
true Transfer is currently in progress
false Transfer is completed

Example

//Check if the SPI transfer has completed
if (SPI1_IsTransmitterBusy() == false)
{
    - Data Transfer is complete, perform the next operation
}

Remarks

None.