Keil Logo

Technical Support

On-Line Manuals

RL-ARM User's Guide (MDK v4)

RL-RTX RL-FlashFS RL-TCPnet RL-CAN RL-USB RL-USB for USB Device Applications RL-USB Device Library RL-USB Device Features RL-USB Device Software Stack RL-USB Device Functions RL-USB Device Source Files RL-USB Device Configuration Audio Device (ADC) Options Communication Device (CDC) - ACM Options Human Interface Device (HID) Options Mass Storage Device (MSC) Options Create USB Device Applications Create ADC Applications Create CDC ACM Applications Create HID Applications Create MSC Applications Create Composite Applications Test USB Device Applications Compliance Tests Test HID Client Application RL-USB for USB Host Applications RL-USB Host Library RL-USB Host Features RL-USB Host Software Stack RL-USB Host Functions RL-USB Host Source Files RL-USB Host Configuration Host Controller Driver Selection Host Controller Driver Configuration Host Class Driver Selection Create USB Host Applications Create USB Host HID Applications HID_Kbd Example Create USB Host MSC Applications Create USB Host Class Driver RL-USB Host Constants and Structures Error constants Speed constants Transaction Packet Type constants Transaction Error Type constants USB Request Block structure (USBH_URB) Endpoint structure (USBH_EP) Driver Capabilites structure (USBH_HCI_CAP) Device Class Instance structure (USBH_DCI) Host Controller Instance structure (USBH_HCI) Host Controller Driver structure (USBH_HCD) USB Concepts USB Transfer Rates USB Network Basic Communication Model USB Protocol Control Transfer Interrupt Transfer Isochronous Transfer Bulk Transfer Descriptors Device Configuration Device Descriptor Configuration Descriptor Interface Descriptor Endpoint Descriptor Device Qualifier Descriptor Example Programs Library Reference Appendix

Host Controller Driver structure (USBH_HCD)

Host Controller Driver (USBH_HCD) structure represents an host controller driver that USB Host Core has on disposal.

typedef struct {                        /* Host Controller Driver structure   */
  void       (*get_capabilities) (USBH_HCI_CAP *cap); /* Get Drv Capabilities */
  void       (*delay_ms        ) (U32  ms);   /* Delay in ms                  */
  BOOL       (*pins_config     ) (BOOL on);   /* Config/Unconfig pins         */
  BOOL       (*init            ) (BOOL on);   /* Init/Uninit Host Controller  */
  BOOL       (*port_power      ) (BOOL on);   /* On/Off Port Power            */
  BOOL       (*port_reset      ) (U8   port); /* Reset Port                   */
  U32        (*get_connect     ) (void);      /* Get port conn/disconn status */
  U32        (*get_speed       ) (void);      /* Get port enumerated speed    */
  U32        (*ep_add          ) (            U8 dev_adr, U8 ep_spd, USB_ENDPOINT_DESCRIPTOR *ptr_epd);
  BOOL       (*ep_config       ) (U32  hndl,  U8 dev_adr, U8 ep_spd, USB_ENDPOINT_DESCRIPTOR *ptr_epd);
  BOOL       (*ep_remove       ) (U32  hndl);
  BOOL       (*urb_submit      ) (U32  hndl,  USBH_URB *ptr_urb);
  BOOL       (*urb_cancel      ) (U32  hndl,  USBH_URB *ptr_urb);
} USBH_HCD;

Explanation of USBH_HCD structure elements:

  • get_capabilities is a pointer to the function used to report driver capabilities.
  • delay_ms is a pointer to the function used to delay execution for a specified time in milliseconds.
  • pins_config is a pointer to function used to configure or unconfigure pins used by the USB Host Controller.
  • init is a pointer to a function used to initialize or uninitialize the USB Host Controller.
  • port_power is a pointer to a function used to drives port power pin on or off (VBUS).
  • port_reset is a pointer to a function used to do a port reset.
  • get_connect is a pointer to a function used to get the port connection status.
  • get_speed is a pointer to a function used to get the port enumerated speed.
  • ep_add is a pointer to a function used to add an endpoint.
  • ep_remove is a pointer to a function used to remove an endpoint.
  • urb_submit is a pointer to a function used to submit the communication request.
  • urb_cancel is a pointer to a function used to cancel the communication request.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.