Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 114 of 157
Apr 1, 2013
5.6 Target Peripheral List
USB-BASIC-FW needs to create a target peripheral list (TPL) for each device class.
Please register vendor ID and product ID by a set of the working USB device to TPL.
Please set this TPL to the member (tpl) in USB_HCDREG_t structure. (Please refer to "USB_HCDREG_t
Structure" in "
5.5 Structure Definitions" )
const uint16_t usb_gapl_devicetpl[] =
{
2, /* Number of list */
0, /* Reserved */
0xXXXX, /* Vendor ID */
0xXXXX, /* Product ID */
0xYYYY, /* Vendor ID */
0xYYYY, /* Product ID */
};
When all vendor IDs and product IDs in the device class are supported, do not specify specific vendor IDs and
product IDs. Instead, register USBC_NOVENDOR and USBC_NOPRODUCT as a set.
5.7 Host Control Transfer
The R_usb_hstd_TransferStart() function must be used to transmit not just standard requests 0, but also vendor or class
requests.
To use R_usb_hstd_TransferStart() to transmit the setup packet, first set the following in the USB_UTR_t structure
member, and then call R_usb_hstd_TransferStart().
Set PIPE0 in*keyword
Set USB_TRAN_END in *segment
Set setup data in *setup
For more on the USB_UTR_t structure, refer to “
5.8.4 The USB Communication Structure (USB_UTR_t)”