Instruction manual

Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 112 of 157
Apr 1, 2013
5.5 Structure Definitions
The structures used in USB host mode are described below. They are defined in file usb_ctypedef.h.
5.5.1 USB_HCDINFO_t structure
The USB_HCDINFO_t structure is used when transferring messages to HCD.
Members of USB_HCDINFO_t Structure are shown in
Table 5.8.
Table 5.8 Member of USB_HCDINFO_t Structure
Type
Variable
Name
Description
USB_MH_t msghead
This message header is used by the OS, so the client should not
make use of it.
uint16_t msginfo Is used by USB-BASIC-FW, so the client should not make use of it.
uint16_t keyword Register the sub-information (port number, pipe number, etc).
USB_REGADR_t ipp Register the base address of the USB IP
uint16_t ip Register the USB IP number (port nr)
USB_CB_t complete
This specifies the address of the function to be executed when
HCD processing ends.
The call-back function should have a void (*USB_CB_INFO_t)
(uint16_t,uint16_t) type declaration. For USB reset signal output
control by the R_usb_hstd_ChangeDeviceState() function, the
reset handshake result is returned as the 1st argument of the call-
back.
For other functions, when call-back occurs, it means that
processing has ended.
5.5.2 USB_HCDREG_t structure
USB_HCDREG_t is a structure for registering the information on HDCD. The call-back registered into this
structure is called when the connected peripheral changes its device state.
Members of the USB_HCDREG_t structure are shown in
Table 5.9.