1.1.9.4.2 DRV_USART_Status Function
C
SYS_STATUS DRV_USART_Status( SYS_MODULE_OBJ object )
Summary
Gets the current status of the USART driver module.
Description
This routine provides the current status of the USART driver module.
Precondition
Function DRV_USART_Initialize should have been called before calling this function.
Parameters
Param | Description |
---|---|
object | Driver object handle, returned from the DRV_USART_Initialize routine |
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
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.
}
Remarks
A driver can opened only when its status is SYS_STATUS_READY.