1.1.8.4.2 DRV_SPI_Status Function

C

SYS_STATUS DRV_SPI_Status( SYS_MODULE_OBJ object )

Summary

Gets the current status of the SPI driver module.

Description

This routine provides the current status of the SPI driver module.

Precondition

Function DRV_SPI_Initialize should have been called before calling this function.

Parameters

ParamDescription
objectDriver object handle, returned from the DRV_SPI_Initialize routine

Returns

SYS_STATUS_READY - Initialization have succeeded and the SPI is ready for additional operations

SYS_STATUS_DEINITIALIZED - Indicates that the driver has been deinitialized

Example

SYS_MODULE_OBJ object; // Returned from DRV_SPI_Initialize
SYS_STATUS spiStatus;

spiStatus = DRV_SPI_Status(object);
if (spiStatus == SYS_STATUS_READY)
{
    // This means now the driver can be opened using the
    // DRV_SPI_Open() function.
}

Remarks

A driver can be opened only when its status is SYS_STATUS_READY.