
USB Basic Firmware <Short Sheet>
R01AN0495EJ0100 Rev.1.00 Page 23 of 32
Apr 15, 2011
(2) Register the HDCD
The structure used to register information in PDCD is described below. The sample application is described in the
R_usb_hstd_SmplRegistration function inusb2_HSMPL_apl.c.
typedef struct {
uint16_t rootport; /* root port */
uint16_t devaddr; /* Device address */
uint16_t devstate; /* Device satate */
uint16_t ifclass; /* Interface Class */
uint16_t *tpl; /* Target Peripheral List */
uint16_t *pipetbl ; /* Pipe Define Table address */
USBC_CB_INFO_t classinit; /* Driver init */
USBC_CB_CHECK_t classcheck; /* Driver check */
USBC_CB_INFO_t devconfig; /* Device configuered */
USBC_CB_INFO_t devdetach; /* Device detach */
USBC_CB_INFO_t devsuspend; /* Device suspend */
USBC_CB_INFO_t devresume; /* Device resume */
USBC_CB_INFO_t overcurrent; /* Device over current */
}USBC_HCDREG_t;
Table. 3.2 Members of USBC_HCDREG_t Structure
Variable Name Description
rootport Used by HCD. The connected port number is registered.
devaddr Used by HCD. The device address is registered.
devstate Used by HCD. The device connection state is registered.
ifclass Register the interface class code for HDCD operation.
*tpl Register the target peripheral list for HDCD operation.
*pipetbl Register the address of the pipe information table.
classinit Register the function started at driver registration.
classcheck Register the function started at HDCD checking operation.
It is called when a TPL match occurs.
devconfig Register the function to be started when transitioning to the configured state.
It is called in the SET_CONFIGURATION request status stage.
devdetach Register the function to be started when transitioning to the detach state.
devsuspend Register the function to be started when transitioning to the suspend state.
devresume Register the function to be started when transitioning to the resume state.
overcurrent Register the function started when overcurrent detection occurs.
Kommentare zu diesen Handbüchern