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

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

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

	/* Send data to the device */
	BytesSent = XUartPsv_SendBuffer(InstancePtr);

	return BytesSent;
}
/*****************************************************************************/
/**
*
* This functions sends the specified buffer using the device in either
* polled or interrupt driven mode. This function is non-blocking, if the
* device is busy sending data, it will return and indicate zero bytes were
* sent. Otherwise, it fills the TX FIFO as much as it can, and return the
* number of bytes sent.
*
* In a polled mode, this function will only send as much data as TX FIFO can
* buffer. The application may need to call it repeatedly to send the entire
* buffer.
*
* In interrupt mode, this function will start sending the specified buffer,
* then the interrupt handler will continue sending data until the entire
* buffer has been sent. A callback function, as specified by the application,
* will be called to indicate the completion of sending.
*
* @param	InstancePtr is a pointer to the XUartPsv instance.
* @param	BufferPtr is pointer to a buffer of data to be sent.
* @param	NumBytes contains the number of bytes to be sent. A value of
*		zero will stop a previous send operation that is in progress
*		in interrupt mode. Any data that was already put into the
*		transmit FIFO will be sent.
*
* @return	The number of bytes actually sent.
*
* @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.
* <br><br>
*
******************************************************************************/
This functions sends the specified buffer using the device in either
polled or interrupt driven mode. This function is non-blocking, if the
device is busy sending data, it will return and indicate zero bytes were
sent. Otherwise, it fills the TX FIFO as much as it can, and return the
number of bytes sent.

In a polled mode, this function will only send as much data as TX FIFO can
buffer. The application may need to call it repeatedly to send the entire
buffer.

In interrupt mode, this function will start sending the specified buffer,
then the interrupt handler will continue sending data until the entire
buffer has been sent. A callback function, as specified by the application,
will be called to indicate the completion of sending.
This functions sends the specified buffer using the device in either polled or interrupt driven mode . This function is non - blocking if the device is busy sending data it will return and indicate zero bytes were sent . Otherwise it fills the TX FIFO as much as it can and return the number of bytes sent . In a polled mode this function will only send as much data as TX FIFO can buffer . The application may need to call it repeatedly to send the entire buffer . In interrupt mode this function will start sending the specified buffer then the interrupt handler will continue sending data until the entire buffer has been sent . A callback function as specified by the application will be called to indicate the completion of sending .
u32 XUartPsv_Send(XUartPsv *InstancePtr, u8 *BufferPtr, u32 NumBytes)
{
	u32 BytesSent;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(BufferPtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	InstancePtr->SendBuffer.RequestedBytes = NumBytes;
	InstancePtr->SendBuffer.RemainingBytes = NumBytes;
	InstancePtr->SendBuffer.NextBytePtr = BufferPtr;
	BytesSent = XUartPsv_SendBuffer(InstancePtr);
	return BytesSent;
}
u32 XUartPsv_Send ( XUartPsv * InstancePtr , u8 * BufferPtr , u32 NumBytes ) { u32 BytesSent ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( BufferPtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; InstancePtr -> SendBuffer . RequestedBytes = NumBytes ; InstancePtr -> SendBuffer . RemainingBytes = NumBytes ; InstancePtr -> SendBuffer . NextBytePtr = BufferPtr ; BytesSent = XUartPsv_SendBuffer ( InstancePtr ) ; return BytesSent ; }
This functions sends the specified buffer using the device in either
polled or interrupt driven mode.
This functions sends the specified buffer using the device in either polled or interrupt driven mode .
/* Asserts validate the input arguments */ /* Setup the buffer parameters */ /* Send data to the device */