4.4.15.3.3 USB_DataToggle()

RETURN_CODE_t USB_DataToggle (USB_PIPE_t pipe)

Toggles the Data Toggle bit on an endpoint which is used to ensure correct data sequence. Only used if hardware data toggling is not available. After a successful transaction, toggle the Data Toggle bit. For SETUP transactions, ensure that the SETUP stage clears the Data Toggle bit, while the data stage and status stage set the Data Toggle bit.

Parameters:
pipe

- A combination of endpoint address and direction

Returns:

SUCCESS or an Error code according to RETURN_CODE_t