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

Human Interface Device (HID) Options

Human Interface Device (HID) Options explains the configuration options for creating an human interface application. The options can be edited in the file usb_config.c directly or using the µVision Configuration Wizard.

RL-USB CDC Configuration

Where
  • Human Interface Device (HID) - enables class support for human interface devices. This option corresponds to #define USBD_HID_ENABLE.
    #define USBD_HID_ENABLE                1                     // 1=enabled; 0=disabled
    
Interrupt Endpoint Settings
configure the endpoint characteristics and affect the Endpoint Descriptors.
  • Interrupt In Endpoint Number sets the endpoint number. Values between 1..15 are allowed. This option corresponds to #define USBD_HID_EP_INTIN.
    #define USBD_HID_EP_INTIN            1                     // value range 1..15
    
  • Interrupt Out Endpoint Number sets the endpoint number. Values between 0..15 are allowed; 0-disables the endpoint for messages sent by the host. This option corresponds to #define USBD_HID_EP_INTOUT.
    #define USBD_HID_EP_INTOUT           1                     // value range 0..15; 0=not used;
    
  • Maximum Endpoint Packet Size (in bytes) sets the maximal packet size. Values between 0..64 are allowed. This option corresponds to #define USBD_HID_WMAXPACKETSIZE.
    #define USBD_HID_WMAXPACKETSIZE      4                     // value range 0..64
    
  • Endpoint polling Interval (in ms) sets the data transfer polling interval. Values from 1..255 are allowed. This option corresponds to #define USBD_HID_BINTERVAL.
    #define USBD_HID_BINTERVAL           32                    // value range 1..255
    
  • High-speed enables the characteristics when using high speed transfer rates. Enable the High Speed option under USB Device. This option corresponds to #define USBD_HID_HS_ENABLE.
    #define USBD_HID_HS_ENABLE           1                     // 1=enabled; 0=disabled
    
  • Maximum Endpoint Packet Size (in bytes) sets the maximal packet size for high speed transfers. Values between 0..1024 are allowed. This option corresponds to #define USBD_HID_HS_WMAXPACKETSIZE.
    #define USBD_HID_HS_WMAXPACKETSIZE   4                     // next option also configures this macro
    
  • Additional transactions per microframe sets the additional transaction packets for high speed transfers. Discrete settings can be selected. This option also corresponds to #define USBD_HID_HS_WMAXPACKETSIZE.
    #define USBD_HID_HS_WMAXPACKETSIZE   4                     // prev. option also configures this macro
    
  • Endpoint polling Interval (in ms) sets the data transfer polling interval for high speed transfers. Values between 1..16 are allowed. Values correspond to interval of 2 ^ (bInterval-1). This option corresponds to #define USBD_HID_HS_BINTERVAL.
    #define USBD_HID_HS_BINTERVAL        6                     // value range 1..16
    
Human Interface Device Settings
configure device specific options.
  • HID Interface String sets the interface string identifier. 126 characters are allowed. This option corresponds to #define USBD_HID_STRDESC.
    #define USBD_HID_STRDESC             L"USB_HID"            // up to 126 characters
    
  • Number of Input Reports sets the amount of input reports in system. Values from 1..32 are allowed. This option corresponds to #define USBD_HID_INREPORT_NUM.
    #define USBD_HID_INREPORT_NUM        1                     // value range 1..32
    
  • Number of Output Reports sets the amount of output reports in system. Values from 1..32 are allowed. This option corresponds to #define USBD_HID_OUTREPORT_NUM.
    #define USBD_HID_OUTREPORT_NUM       1                     // value range 1..32
    
  • Maximum Input Report Size (in bytes) sets the maximum size for reports sent to the host. Values from 1..65535 are allowed. This option corresponds to #define USBD_HID_INREPORT_MAX_SZ.
    #define USBD_HID_INREPORT_MAX_SZ     1                     // value range 1..65535
    
  • Maximum Output Report Size (in bytes) sets the maximum size for reports received by the host. Values from 1..65535 are allowed. This option corresponds to #define USBD_HID_OUTREPORT_MAX_SZ.
    #define USBD_HID_OUTREPORT_MAX_SZ    1                     // value range 1..65535
    
  • Maximum Feature Report Size (in bytes) sets the maximum size for feature reports. Values from 1..65535 are allowed. This option corresponds to #define USBD_HID_FEATREPORT_MAX_SZ.
    #define USBD_HID_FEATREPORT_MAX_SZ   1                     // value range 1..65535
    

Note

  • The USB Device Controller hardware might impose restrictions on the use of endpoints.
  • Refer to Create HID Applications for a quick-start on programming a USB HID Device.
  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.