XilinxProcessorIPLib/drivers/uartpsv/src/xuartpsv.c
u32 XUartPsv_Recv(XUartPsv *InstancePtr, u8 *BufferPtr, u32 NumBytes)
{
	u32 ReceivedCount;

	/* Assert validates the input arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(BufferPtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	/* Setup the buffer parameters */
	InstancePtr->ReceiveBuffer.RequestedBytes = NumBytes;
	InstancePtr->ReceiveBuffer.RemainingBytes = NumBytes;
	InstancePtr->ReceiveBuffer.NextBytePtr = BufferPtr;

	/* Receive the data from the device */
	ReceivedCount = XUartPsv_ReceiveBuffer(InstancePtr);

	return ReceivedCount;
}
/*****************************************************************************/
/**
*
* This function attempts to receive a specified number of bytes of data
* from the device and store it into the specified buffer. This function works
* for both polled or interrupt driven modes. It is non-blocking.
*
* In a polled mode, this function will only receive the data already in the
* RX FIFO. The application may need to call it repeatedly to receive the
* entire buffer. Polled mode is the default mode of operation for the device.
*
* In interrupt mode, this function will start the receiving, if not the entire
* buffer has been received, the interrupt handler will continue receiving data
* until the entire buffer has been received. A callback function, as specified
* by the application, will be called to indicate the completion of the
* receiving or error conditions.
*
* @param	InstancePtr is a pointer to the XUartPsv instance
* @param	BufferPtr is pointer to buffer for data to be received into
* @param	NumBytes is the number of bytes to be received. A value of
*		zero will stop a previous receive operation that is in
*		progress in interrupt mode.
*
* @return	The number of bytes received.
*
* @note
* The number of bytes is not asserted so that this function may be called
* with a value of zero to stop an operation that is already in progress.
*
******************************************************************************/
This function attempts to receive a specified number of bytes of data
from the device and store it into the specified buffer. This function works
for both polled or interrupt driven modes. It is non-blocking.

In a polled mode, this function will only receive the data already in the
RX FIFO. The application may need to call it repeatedly to receive the
entire buffer. Polled mode is the default mode of operation for the device.

In interrupt mode, this function will start the receiving, if not the entire
buffer has been received, the interrupt handler will continue receiving data
until the entire buffer has been received. A callback function, as specified
by the application, will be called to indicate the completion of the
receiving or error conditions.
This function attempts to receive a specified number of bytes of data from the device and store it into the specified buffer . This function works for both polled or interrupt driven modes . It is non - blocking . In a polled mode this function will only receive the data already in the RX FIFO . The application may need to call it repeatedly to receive the entire buffer . Polled mode is the default mode of operation for the device . In interrupt mode this function will start the receiving if not the entire buffer has been received the interrupt handler will continue receiving data until the entire buffer has been received . A callback function as specified by the application will be called to indicate the completion of the receiving or error conditions .
u32 XUartPsv_Recv(XUartPsv *InstancePtr, u8 *BufferPtr, u32 NumBytes)
{
	u32 ReceivedCount;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(BufferPtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	InstancePtr->ReceiveBuffer.RequestedBytes = NumBytes;
	InstancePtr->ReceiveBuffer.RemainingBytes = NumBytes;
	InstancePtr->ReceiveBuffer.NextBytePtr = BufferPtr;
	ReceivedCount = XUartPsv_ReceiveBuffer(InstancePtr);
	return ReceivedCount;
}
u32 XUartPsv_Recv ( XUartPsv * InstancePtr , u8 * BufferPtr , u32 NumBytes ) { u32 ReceivedCount ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( BufferPtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; InstancePtr -> ReceiveBuffer . RequestedBytes = NumBytes ; InstancePtr -> ReceiveBuffer . RemainingBytes = NumBytes ; InstancePtr -> ReceiveBuffer . NextBytePtr = BufferPtr ; ReceivedCount = XUartPsv_ReceiveBuffer ( InstancePtr ) ; return ReceivedCount ; }
This function attempts to receive a specified number of bytes of data
from the device and store it into the specified buffer.
This function attempts to receive a specified number of bytes of data from the device and store it into the specified buffer .
/* Assert validates the input arguments */ /* Setup the buffer parameters */ /* Receive the data from the device */