Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 57 of 157
Apr 1, 2013
R_usb_pstd_TransferStart() is called and data transfer request executed.
After data transfer is complete, the call-back function “complete” that was set in (1) above for is called and the transfer
results are notified to PDCD. Refer to
4.5.2, Notification of transfer result.
4.6 Pipe Definition
4.6.1 Overview
When using the device in peripheral mode, the PDCD (the class driver) must store appropriate pipe settings as a pipe
information table.
A sample pipe information table for the peripheral sample program is in file r_usb_vendor_descriptor.c.
4.6.2 Pipe information table
A pipe information table comprises the following six items (uint16_t × 6).
1. Pipe Window Select register (address 0x64)
2. Pipe Configuration register (address 0x68)
3. Pipe Buffer Designation register (address 0x6A)
4. Pipe Maximum Packet Size register (address 0x6C)
5. Pipe Period Control register (address 0x6E)
6. FIFO port usage method
4.6.3 Definition of pipes 1 to 9
The pipe definitions provided as a sample in USB-BASIC-FW are configured as shown below.
Possible pipe values that can be set in the pipe information table are defined as macros in the r_usb_cdefusbip.h file.
Example of Pipe Information table
uint16_t usb_gpvendor_smpl_eptbl1[] = <-- Registered Pipe Information Table
{
USB_PIPE1, <-- Pipe definition item 1
USB_BULK|USB_BFREOFF|USB_DBLBON|USB_SHTNAKON|USB_DIR_P_IN|USB_EP1, <-- Pipe
definition item 2
USB_NONE, <-- Pipe definition item 3
64, <-- Pipe definition item 4
USB_IFISOFF | USB_IITV_TIME(0u), <-- Pipe definition item 5
USB_CUSE, <-- Pipe definition item 6
<NEW PIPE start in this position>
USB_PDTBLEND,
}