Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 54 of 157
Apr 1, 2013
4.4.2 Note
Make sure that the capacity of the user buffer exceeds the transmit/receive data size (Bsize) of the control transfer data
stage.
4.5 Data Transfer
4.5.1 Transfer requests
When using the ANSI-type interface, use read() or write() to start a data transfer request.
When not using the ANSI-type interface, use R_usb_pstd_TransferStart() to start a data transfer. For more details on the
API functions described here, please refer to the corresponding API section.
4.5.2 Notification of transfer result
When a data transfer completes, the firmware notifies the PDCD of the data transfer completion and the sequence toggle
bit information in the call-back function registered when the data transfer was requested.
The results of the transfer are stored in the USB_UTR_t structure member status.
The USB_UTR_t structure is provided to PDCD (by PCD) as the first argument of the callback function..
The following shows the transfer result.
USB_DATA_NONE : Data transmit normal end
USB_DATA_OK : Data receive normal end
USB_DATA_SHT : Data receive normal end with less than specified data length
USB_DATA_STALL : STALL response or MaxPacketSize error detected
USB_DATA_STOP : Data transfer forced end
USB_DATA_TMO : Forced end due to timeout, no call-back (uITRON only)