4.4.7.2.5 USB_TransferWriteStart()

RETURN_CODE_t USB_TransferWriteStart (USB_PIPE_t pipe, uint8_t * dataPtr, uint16_t dataSize, bool useZLP, USB_TRANSFER_END_CALLBACK_t callback)

Sets up the pipe for the write transfers.

Sets up the pipe for the write transfers and checks to see if it is busy. If it is not busy, then the routine resets the pipe, setting it up for write transfer, then starts the transfer.

Parameters:
pipe

- A combination of endpoint address and direction

*dataPtr

- The pointer to the data to write

dataSize

- The size of the data to write

useZLP

- Enable zero-length package at the end of transfer

callback

- A combination of pipe, status and transferred bytes

Returns:

SUCCESS or an Error code according to RETURN_CODE_t