1.1.9.4.2 DRV_SPI_Status Function

1.1.9.4.2 C

SYS_STATUS DRV_SPI_Status( SYS_MODULE_OBJ object )

1.1.9.4.2 Summary

Gets the current status of the SPI driver module.

1.1.9.4.2 Description

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

1.1.9.4.2 Precondition

Function DRV_SPI_Initialize should have been called before calling this function.

1.1.9.4.2 Parameters

ParametersDescription
objectDriver object handle, returned from the DRV_SPI_Initialize routine

1.1.9.4.2 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.

1.1.9.4.2 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.
}

1.1.9.4.2 Remarks

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