XilinxProcessorIPLib/drivers/uartlite/src/xuartlite.c
u8 XUartLite_GetSR(XUartLite *InstancePtr)
{
	u8 StatusRegister;

	StatusRegister = XUartLite_GetStatusReg(InstancePtr->RegBaseAddress);
	/*
	 * Update Stats everytime status reg is read as it is a clear on read
	 * register and as a result, there is a chance of missing the errors.
	 */
	XUartLite_UpdateStats(InstancePtr, StatusRegister);
	return StatusRegister;
}
/****************************************************************************/
/**
*
* This function reads the status register and updates the error stats, before
* returning the status register value. The status register is a clear on read
* register, so the errors if occurred have to be recorded everytime status
* register is read. This function is designed to be an internal function for
* the XUartLite component such that it may be called from wherever the status
* register needs to be read from the other driver functions.
*
* @param        InstancePtr is a pointer to the XUartLite instance.
*
* @return       The value of status register.
*
* @note         None.
*
*****************************************************************************/
This function reads the status register and updates the error stats, before
returning the status register value. The status register is a clear on read
register, so the errors if occurred have to be recorded everytime status
register is read. This function is designed to be an internal function for
the XUartLite component such that it may be called from wherever the status
register needs to be read from the other driver functions.
This function reads the status register and updates the error stats before returning the status register value . The status register is a clear on read register so the errors if occurred have to be recorded everytime status register is read . This function is designed to be an internal function for the XUartLite component such that it may be called from wherever the status register needs to be read from the other driver functions .
u8 XUartLite_GetSR(XUartLite *InstancePtr)
{
	u8 StatusRegister;
	StatusRegister = XUartLite_GetStatusReg(InstancePtr->RegBaseAddress);
	XUartLite_UpdateStats(InstancePtr, StatusRegister);
	return StatusRegister;
}
u8 XUartLite_GetSR ( XUartLite * InstancePtr ) { u8 StatusRegister ; StatusRegister = XUartLite_GetStatusReg ( InstancePtr -> RegBaseAddress ) ; XUartLite_UpdateStats ( InstancePtr , StatusRegister ) ; return StatusRegister ; }
This function reads the status register and updates the error stats, before
returning the status register value.
This function reads the status register and updates the error stats before returning the status register value .
/*
	 * Update Stats everytime status reg is read as it is a clear on read
	 * register and as a result, there is a chance of missing the errors.
	 */