Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 51 of 157
Apr 1, 2013
4.3 Structure Definitions
The structures used in USB peripheral mode are described below. They are defined in file usb_ctypedef.h.
4.3.1 USB_PCDREG_t structure
The USB_PCDREG_t structure is used to register PDCD information using the function
R_usb_pstd_DriverRegsitration. The call-back function registered in USB_PCDREG_t is executed when the device
state changes, etc.
Table 4-7 lists the members of the USB_PCDREG_t structure.
Table 4-7 Member of USB_PCDREG_t structure
type member Description
uint16_t **pipetbl Register the address of the pipe information table.
uint8_t *devicetbl Register the device descriptor address.
uint8_t *qualitbl Register the device qualifier descriptor address.
uint8_t **configtbl Register the address of the configuration descriptor address table.
uint8_t **othertbl Register the address of the other speed descriptor address table.
uint8_t **stringtbl Register the address of the string descriptor address table.
USB_CB_INFO_t classinit Register the function to be started when initializing PDCD.
It is called at registration.
USB_CB_INFO_t devdefault
Register the function to be started when transitioning to the default
state. It is called when a USB reset is detected.
USB_CB_INFO_t devconfig
Register the function to be started when transitioning to the
configured state. It is called in the SET_CONFIGURATION request
status stage.
USB_CB_INFO_t devdetach
Register the function to be started when transitioning to the detach
state. It is called when a detached condition is detected.
USB_CB_INFO_t devsuspend
Register the function to be started when transitioning to the
suspend state. It is called when a suspend condition is detected.
USB_CB_INFO_t devresume
Register the function to be started when transitioning to the resume
state. It is called when a resume condition is detected.
USB_CB_INFO_t interface
Register the function to be started when an interface change
occurs. It is called in the SET_INTERFACE request status stage.
USB_CB_TRN_t ctrltrans
Register the function to be started when a user-initiated control
transfer occurs.