Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 84 of 157
Apr 1, 2013
R_usb_hstd_TransferEnd
Data transfer forced end request
Format
USB_ER_t R_usb_hstd_TransferEnd (USB_UTR_t *ptr, uint16_t pipe, uint16_t status)
Argument
*ptr Pointer to USB transfer structure
pipe Pipe number
status USB communication status
Return Value
non-OS
USB_E_OK Success
USB_E_ERROR Failure
RTOS
Error code. Please refer to RI600/4 User's manual for RX family Real-time OS.
Description
This function forces data transfer via the pipes to end.
This “forced end” request is sent to HCD which does the forced end request processing.
When a data transfer is forcibly ended, the function calls the call-back function that was set by
R_usb_pstd_TransferStart when the data transfer was requested. The remaining data length of transmission and
reception, status, the number of times of a transmission error, and the information on forced termination are set in the
argument (ptr) of this callback function.
Note
1. Besides above arguments, also set the following members of the USB Transfer Structure before calling the
function.
USB_REGADR_t ipp USB register base address
uint16_t ip USB IP number
2. Call this function from the user application or the class driver (HDCD).
3. This function is not necessary when using the ANSI IO API.