1.1.10.4.2 DRV_USART_Status Function

1.1.10.4.2 C

SYS_STATUS DRV_USART_Status( SYS_MODULE_OBJ object )

1.1.10.4.2 Summary

Gets the current status of the USART driver module.

1.1.10.4.2 Description

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

1.1.10.4.2 Precondition

Function DRV_USART_Initialize should have been called before calling this function.

1.1.10.4.2 Parameters

ParametersDescription
objectDriver object handle, returned from the DRV_USART_Initialize routine

1.1.10.4.2 Returns

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

SYS_STATUS_UNINITIALIZED - Indicates that the driver has not been initialized.

1.1.10.4.2 Example

SYS_MODULE_OBJ object; // Returned from DRV_USART_Initialize
SYS_STATUS usartStatus;

usartStatus = DRV_USART _Status(object);
if (usartStatus == SYS_STATUS_READY)
{
    // This means the driver can be opened using the
    // DRV_USART_Open() function.
}

1.1.10.4.2 Remarks

A driver can opened only when its status is SYS_STATUS_READY.