4.6.43.1 Functions
RETURN_CODE_t USB_TransactionStart (USB_PIPE_t pipe)
Starts sending or receiving data on an endpoint by clearing BUSNACK. Used as a final step while setting up a transaction on the bus.
RETURN_CODE_t USB_TransactionAbort (USB_PIPE_t pipe)
Aborts the next transaction on an endpoint by setting BUSNACK. Used to stop exchanging data on an endpoint. The device will start NAKing requests from the host after calling this API.
RETURN_CODE_t USB_TransactionCompleteAck (USB_PIPE_t pipe)
Acknowledges the Transaction Complete status condition by clearing the Transaction Complete status bit. Used to clear the Transaction Complete status bit after a transaction has successfully completed.
bool USB_TransactionIsCompleted (void)
Helper function to return the endpoint transaction complete condition.
RETURN_CODE_t USB_TransactionCompletedPipeGet (USB_PIPE_t *pipe)
Returns the pipe address and direction for the latest completed transaction.
RETURN_CODE_t USB_PipeReset (USB_PIPE_t pipe)
Resets the pipe.
USB_TRANSFER_STATUS_t USB_PipeStatusGet (USB_PIPE_t pipe)
Gets the current status of pipe.
bool USB_PipeStatusIsBusy (USB_PIPE_t pipe)
Checks if the pipe status is busy.
void USB_PipeDataPtrSet (USB_PIPE_t pipe, uint8_t *dataPtr)
Configures the pointer for the data transfer in a given pipe.
uint8_t * USB_PipeDataPtrGet (USB_PIPE_t pipe)
Gets the current data pointer for a given pipe.
void USB_PipeDataToTransferSizeSet (USB_PIPE_t pipe, uint16_t dataSize)
Sets the size of pipe data to transfer.
uint16_t USB_PipeDataToTransferSizeGet (USB_PIPE_t pipe)
Gets the size of pipe data to transfer.
uint16_t USB_PipeDataTransferredSizeGet (USB_PIPE_t pipe)
Gets the size of the transferred pipe data.
void USB_PipeDataTransferredSizeSet (USB_PIPE_t pipe, uint16_t dataSize)
Sets the size of the transferred pipe data.
void USB_PipeDataTransferredSizeReset (USB_PIPE_t pipe)
Resets the size of transferred pipe data.
void USB_PipeTransferZLP_Enable (USB_PIPE_t pipe)
Enables a ZLP on a transfer. It is enabled by default if the AZLP static config is enabled for the pipe.
void USB_PipeTransferEndCallbackRegister (USB_PIPE_t pipe, USB_TRANSFER_END_CALLBACK_t callback)
Sets the callback for transfer end.
void USB_PipeTransferEndCallback (USB_PIPE_t pipe)
Calls the callback for transfer end.
RETURN_CODE_t USB_InTransactionRun (USB_PIPE_t pipe)
Checks the correctness of IN transactions and runs them.
RETURN_CODE_t USB_OutTransactionRun (USB_PIPE_t pipe)
Checks the correctness OUT transactions and runs them.
RETURN_CODE_t USB_PipeTransactionComplete (USB_PIPE_t pipe)
Handles completed IN and OUT transactions. Processes the completed transaction and either completes the transfer or runs the next transaction. Will call the pipe transferEndCallback at the end of transfer, if configured.