Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends 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_mouse_desc_t
 Interface descriptor structure for HID mouse. More...
 
struct  udi_hid_mouse_report_desc_t
 Report descriptor for HID mouse. More...
 

Macros

#define UDI_HID_MOUSE_DESC
 Content of HID mouse interface descriptor for all speed. More...
 
#define UDI_HID_MOUSE_EP_SIZE   8
 HID mouse endpoints size. More...
 
#define UDI_HID_MOUSE_STRING_ID   0
 By default no string associated to this interface. More...
 

#define UDI_HID_MOUSE_DESC
Value:
{\
.iface.bLength = sizeof(usb_iface_desc_t),\
.iface.bDescriptorType = USB_DT_INTERFACE,\
.iface.bInterfaceNumber = UDI_HID_MOUSE_IFACE_NUMBER,\
.iface.bAlternateSetting = 0,\
.iface.bNumEndpoints = 1,\
.iface.bInterfaceClass = HID_CLASS,\
.iface.bInterfaceSubClass = HID_SUB_CLASS_BOOT,\
.iface.bInterfaceProtocol = HID_PROTOCOL_MOUSE,\
.iface.iInterface = UDI_HID_MOUSE_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_mouse_report_desc_t)),\
.ep.bLength = sizeof(usb_ep_desc_t),\
.ep.bDescriptorType = USB_DT_ENDPOINT,\
.ep.bEndpointAddress = UDI_HID_MOUSE_EP_IN,\
.ep.bmAttributes = USB_EP_TYPE_INTERRUPT,\
.ep.wMaxPacketSize = LE16(UDI_HID_MOUSE_EP_SIZE),\
.ep.bInterval = 10,\
}
#define HID_SUB_CLASS_BOOT
Interface subclass support BOOT protocol.
Definition: usb_protocol_hid.h:67
HID Descriptor.
Definition: usb_protocol_hid.h:123
#define UDI_HID_MOUSE_IFACE_NUMBER
Interface number.
Definition: common/services/usb/class/composite/device/example1/conf_usb.h:175
#define UDI_HID_MOUSE_STRING_ID
By default no string associated to this interface.
Definition: udi_hid_mouse.h:89
#define UDI_HID_MOUSE_EP_IN
USB HID Mouse low level configuration In standalone these configurations are defined by the HID Mouse...
Definition: common/services/usb/class/composite/device/example1/conf_usb.h:172
#define LE16(x)
Definition: compiler.h:1112
#define HID_CLASS
Definition: usb_ids.h:136
#define USB_HID_NUM_DESC
Numeric expression specifying the number of class descriptors Note: Always at least one i...
Definition: usb_protocol_hid.h:150
Definition: usb_protocol_hid.h:93
Definition: usb_protocol.h:201
Definition: usb_protocol.h:200
#define USB_HID_NO_COUNTRY_CODE
Definition: usb_protocol_hid.h:154
Standard USB interface descriptor structure.
Definition: usb_protocol.h:460
Report descriptor for HID mouse.
Definition: udi_hid_mouse.h:82
Definition: usb_protocol_hid.h:94
#define USB_HID_BDC_V1_11
Numeric expression identifying the HID Class Specification release (here V1.11)
Definition: usb_protocol_hid.h:147
Standard USB endpoint descriptor structure.
Definition: usb_protocol.h:475
Definition: usb_protocol.h:266
#define HID_PROTOCOL_MOUSE
Protocol mouse standard.
Definition: usb_protocol_hid.h:77
#define UDI_HID_MOUSE_EP_SIZE
HID mouse endpoints size.
Definition: udi_hid_mouse.h:93

Content of HID mouse interface descriptor for all speed.

#define UDI_HID_MOUSE_EP_SIZE   8

HID mouse endpoints size.

#define UDI_HID_MOUSE_STRING_ID   0

By default no string associated to this interface.