Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

The following structures provide predefined USB interface descriptors.

It must be used to define the final USB descriptors.

Data Structures

struct  udi_hid_kbd_desc_t
 Interface descriptor structure for HID keyboard. More...
 
struct  udi_hid_kbd_report_desc_t
 Report descriptor for HID keyboard. More...
 

Macros

#define UDI_HID_KBD_DESC
 Content of HID keyboard interface descriptor for all speed. More...
 
#define UDI_HID_KBD_EP_SIZE   8
 By default no string associated to this interface. More...
 

#define UDI_HID_KBD_DESC
Value:
{\
.iface.bLength = sizeof(usb_iface_desc_t),\
.iface.bDescriptorType = USB_DT_INTERFACE,\
.iface.bInterfaceNumber = UDI_HID_KBD_IFACE_NUMBER,\
.iface.bAlternateSetting = 0,\
.iface.bNumEndpoints = 1,\
.iface.bInterfaceClass = HID_CLASS,\
.iface.bInterfaceSubClass = HID_SUB_CLASS_NOBOOT,\
.iface.bInterfaceProtocol = HID_PROTOCOL_KEYBOARD,\
.iface.iInterface = UDI_HID_KBD_STRING_ID,\
.hid.bLength = sizeof(usb_hid_descriptor_t),\
.hid.bDescriptorType = USB_DT_HID,\
.hid.bcdHID = LE16(USB_HID_BDC_V1_11),\
.hid.bCountryCode = USB_HID_NO_COUNTRY_CODE,\
.hid.bNumDescriptors = USB_HID_NUM_DESC,\
.hid.bRDescriptorType = USB_DT_HID_REPORT,\
.hid.wDescriptorLength = LE16(sizeof(udi_hid_kbd_report_desc_t)),\
.ep.bLength = sizeof(usb_ep_desc_t),\
.ep.bDescriptorType = USB_DT_ENDPOINT,\
.ep.bEndpointAddress = UDI_HID_KBD_EP_IN,\
.ep.bmAttributes = USB_EP_TYPE_INTERRUPT,\
.ep.wMaxPacketSize = LE16(UDI_HID_KBD_EP_SIZE),\
.ep.bInterval = 2,\
}
HID Descriptor.
Definition: usb_protocol_hid.h:116
#define USB_HID_NUM_DESC
Numeric expression specifying the number of class descriptors Note: Always at least one i...
Definition: usb_protocol_hid.h:143
Definition: usb_protocol_hid.h:86
Definition: usb_protocol.h:194
#define HID_SUB_CLASS_NOBOOT
Interface subclass NO support BOOT protocol.
Definition: usb_protocol_hid.h:58
Definition: usb_protocol.h:193
#define USB_HID_NO_COUNTRY_CODE
Definition: usb_protocol_hid.h:147
#define HID_CLASS
Definition: usb_protocol_hid.h:52
Standard USB interface descriptor structure.
Definition: usb_protocol.h:446
#define UDI_HID_KBD_IFACE_NUMBER
Interface number.
Definition: udi_hid_kbd_conf.h:53
Definition: usb_protocol_hid.h:87
#define USB_HID_BDC_V1_11
Numeric expression identifying the HID Class Specification release (here V1.11)
Definition: usb_protocol_hid.h:140
Report descriptor for HID keyboard.
Definition: udi_hid_kbd.h:75
Standard USB endpoint descriptor structure.
Definition: usb_protocol.h:461
#define UDI_HID_KBD_EP_SIZE
By default no string associated to this interface.
Definition: udi_hid_kbd.h:86
#define LE16(x)
Definition: compiler.h:773
#define UDI_HID_KBD_EP_IN
Endpoint number used by HID keyboard interface.
Definition: udi_hid_kbd_conf.h:50
Definition: usb_protocol.h:252
#define HID_PROTOCOL_KEYBOARD
Protocol keyboard standard.
Definition: usb_protocol_hid.h:68

Content of HID keyboard interface descriptor for all speed.

#define UDI_HID_KBD_EP_SIZE   8

By default no string associated to this interface.

HID keyboard endpoints size