XilinxProcessorIPLib/drivers/uartpsv/src/xuartpsv_intr.c
static void XUartPsv_ReceiveErrorHandler(XUartPsv *InstancePtr)
{
	/*
	 * If there are bytes still to be received in the specified buffer
	 * go ahead and receive them. Removing bytes from the RX FIFO will
	 * clear the interrupt.
	 */
	if (InstancePtr->ReceiveBuffer.RemainingBytes != (u32)0) {
		(void)XUartPsv_ReceiveBuffer(InstancePtr);
	}

	/* Clear the error bit */
	XUartPsv_WriteReg(InstancePtr->Config.BaseAddress,
			XUARTPSV_UARTRSR_OFFSET,XUARTPSV_UARTRSR_OE);

	/* Indicate the overrun error to the application */
	InstancePtr->Handler(InstancePtr->CallBackRef,
			XUARTPSV_EVENT_RECV_ORERR,
					(InstancePtr->ReceiveBuffer.RequestedBytes -
					InstancePtr->ReceiveBuffer.RemainingBytes));
}
/*****************************************************************************/
/**
*
* This function handles the interrupt when there is overrun error in Rx path
*
* @param	InstancePtr is a pointer to the XUartPsv instance
*
* @return	None.
*
* @note 	None.
*
******************************************************************************/
This function handles the interrupt when there is overrun error in Rx path
This function handles the interrupt when there is overrun error in Rx path
static void XUartPsv_ReceiveErrorHandler(XUartPsv *InstancePtr)
{
	if (InstancePtr->ReceiveBuffer.RemainingBytes != (u32)0) {
		(void)XUartPsv_ReceiveBuffer(InstancePtr);
	}
	XUartPsv_WriteReg(InstancePtr->Config.BaseAddress,
			XUARTPSV_UARTRSR_OFFSET,XUARTPSV_UARTRSR_OE);
	InstancePtr->Handler(InstancePtr->CallBackRef,
			XUARTPSV_EVENT_RECV_ORERR,
					(InstancePtr->ReceiveBuffer.RequestedBytes -
					InstancePtr->ReceiveBuffer.RemainingBytes));
}
static void XUartPsv_ReceiveErrorHandler ( XUartPsv * InstancePtr ) { if ( InstancePtr -> ReceiveBuffer . RemainingBytes != ( u32 ) 0 ) { ( void ) XUartPsv_ReceiveBuffer ( InstancePtr ) ; } XUartPsv_WriteReg ( InstancePtr -> Config . BaseAddress , XUARTPSV_UARTRSR_OFFSET , XUARTPSV_UARTRSR_OE ) ; InstancePtr -> Handler ( InstancePtr -> CallBackRef , XUARTPSV_EVENT_RECV_ORERR , ( InstancePtr -> ReceiveBuffer . RequestedBytes - InstancePtr -> ReceiveBuffer . RemainingBytes ) ) ; }
This function handles the interrupt when there is overrun error in Rx path
This function handles the interrupt when there is overrun error in Rx path
/*
	 * If there are bytes still to be received in the specified buffer
	 * go ahead and receive them. Removing bytes from the RX FIFO will
	 * clear the interrupt.
	 */ /* Clear the error bit */ /* Indicate the overrun error to the application */