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_vendor_desc_t
 Interface descriptor structure for vendor Class interface. More...
 

Macros

#define UDI_VENDOR_DESC
 Content of vendor interface descriptor for all speeds. More...
 
#define UDI_VENDOR_DESC_FS
 Content of vendor interface descriptor for full speed only. More...
 
#define UDI_VENDOR_DESC_HS
 Content of vendor interface descriptor for high speed only. More...
 
#define UDI_VENDOR_EP_NB   (UDI_VENDOR_EP_NB_INT+UDI_VENDOR_EP_NB_BULK+UDI_VENDOR_EP_NB_ISO)
 
#define UDI_VENDOR_EP_NB_BULK   ((UDI_VENDOR_EPS_SIZE_BULK_FS)?2:0)
 
#define UDI_VENDOR_EP_NB_INT   ((UDI_VENDOR_EPS_SIZE_INT_FS)?2:0)
 By default no string associated to this interface. More...
 
#define UDI_VENDOR_EP_NB_ISO   ((UDI_VENDOR_EPS_SIZE_ISO_FS)?2:0)
 

Endpoint descriptors

#define UDI_VENDOR_EPS_INT_DESC
 
#define UDI_VENDOR_EPS_INT_DESC_FS
 
#define UDI_VENDOR_EPS_INT_DESC_HS
 
#define UDI_VENDOR_EPS_BULK_DESC
 
#define UDI_VENDOR_EPS_BULK_DESC_FS
 
#define UDI_VENDOR_EPS_BULK_DESC_HS
 
#define UDI_VENDOR_EPS_ISO_DESC
 
#define UDI_VENDOR_EPS_ISO_DESC_FS
 
#define UDI_VENDOR_EPS_ISO_DESC_HS
 

#define UDI_VENDOR_DESC
Value:
.iface0.bLength = sizeof(usb_iface_desc_t),\
.iface0.bDescriptorType = USB_DT_INTERFACE,\
.iface0.bInterfaceNumber = UDI_VENDOR_IFACE_NUMBER,\
.iface0.bAlternateSetting = 0,\
.iface0.bNumEndpoints = 0,\
.iface0.bInterfaceClass = VENDOR_CLASS,\
.iface0.bInterfaceSubClass = VENDOR_SUBCLASS,\
.iface0.bInterfaceProtocol = VENDOR_PROTOCOL,\
.iface0.iInterface = UDI_VENDOR_STRING_ID,\
.iface1.bLength = sizeof(usb_iface_desc_t),\
.iface1.bDescriptorType = USB_DT_INTERFACE,\
.iface1.bInterfaceNumber = UDI_VENDOR_IFACE_NUMBER,\
.iface1.bAlternateSetting = 1,\
.iface1.bNumEndpoints = UDI_VENDOR_EP_NB,\
.iface1.bInterfaceClass = VENDOR_CLASS,\
.iface1.bInterfaceSubClass = VENDOR_SUBCLASS,\
.iface1.bInterfaceProtocol = VENDOR_PROTOCOL,\
.iface1.iInterface = UDI_VENDOR_STRING_ID,\
#define UDI_VENDOR_EP_NB
Definition: udi_vendor.h:206
#define VENDOR_PROTOCOL
Definition: usb_protocol_vendor.h:53
#define UDI_VENDOR_EPS_ISO_DESC
Definition: udi_vendor.h:172
Definition: usb_protocol.h:193
Standard USB interface descriptor structure.
Definition: usb_protocol.h:446
#define UDI_VENDOR_IFACE_NUMBER
Interface number is 0 because it is the unique interface.
Definition: udi_vendor_conf.h:96
#define VENDOR_CLASS
Definition: usb_protocol_vendor.h:51
#define VENDOR_SUBCLASS
Definition: usb_protocol_vendor.h:52

Content of vendor interface descriptor for all speeds.

#define UDI_VENDOR_DESC_FS
Value:

Content of vendor interface descriptor for full speed only.

#define UDI_VENDOR_DESC_HS
Value:

Content of vendor interface descriptor for high speed only.

#define UDI_VENDOR_EP_NB_BULK   ((UDI_VENDOR_EPS_SIZE_BULK_FS)?2:0)
#define UDI_VENDOR_EP_NB_INT   ((UDI_VENDOR_EPS_SIZE_INT_FS)?2:0)

By default no string associated to this interface.

Maximum 6 endpoints used by vendor interface

#define UDI_VENDOR_EP_NB_ISO   ((UDI_VENDOR_EPS_SIZE_ISO_FS)?2:0)
#define UDI_VENDOR_EPS_BULK_DESC
Value:
.ep_bulk_in.bLength = sizeof(usb_ep_desc_t),\
.ep_bulk_in.bDescriptorType = USB_DT_ENDPOINT,\
.ep_bulk_in.bEndpointAddress = UDI_VENDOR_EP_BULK_IN,\
.ep_bulk_in.bmAttributes = USB_EP_TYPE_BULK,\
.ep_bulk_in.bInterval = 0,\
.ep_bulk_out.bLength = sizeof(usb_ep_desc_t),\
.ep_bulk_out.bDescriptorType = USB_DT_ENDPOINT,\
.ep_bulk_out.bEndpointAddress = UDI_VENDOR_EP_BULK_OUT,\
.ep_bulk_out.bmAttributes = USB_EP_TYPE_BULK,\
.ep_bulk_out.bInterval = 0,
Definition: usb_protocol.h:194
#define UDI_VENDOR_EP_BULK_IN
Definition: udi_vendor_conf.h:57
Definition: usb_protocol.h:251
#define UDI_VENDOR_EP_BULK_OUT
Definition: udi_vendor_conf.h:58
Standard USB endpoint descriptor structure.
Definition: usb_protocol.h:461
#define UDI_VENDOR_EPS_BULK_DESC_FS
Value:
.ep_bulk_in.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_BULK_FS),\
.ep_bulk_out.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_BULK_FS),
#define UDI_VENDOR_EPS_SIZE_BULK_FS
Definition: conf_usb.h:118
#define LE16(x)
Definition: compiler.h:773
#define UDI_VENDOR_EPS_BULK_DESC_HS
Value:
.ep_bulk_in.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_BULK_HS),\
.ep_bulk_out.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_BULK_HS),
#define UDI_VENDOR_EPS_SIZE_BULK_HS
Definition: conf_usb.h:127
#define LE16(x)
Definition: compiler.h:773
#define UDI_VENDOR_EPS_INT_DESC
Value:
.ep_interrupt_in.bLength = sizeof(usb_ep_desc_t),\
.ep_interrupt_in.bDescriptorType = USB_DT_ENDPOINT,\
.ep_interrupt_in.bEndpointAddress = UDI_VENDOR_EP_INTERRUPT_IN,\
.ep_interrupt_in.bmAttributes = USB_EP_TYPE_INTERRUPT,\
.ep_interrupt_in.bInterval = 1,\
.ep_interrupt_out.bLength = sizeof(usb_ep_desc_t),\
.ep_interrupt_out.bDescriptorType = USB_DT_ENDPOINT,\
.ep_interrupt_out.bEndpointAddress = UDI_VENDOR_EP_INTERRUPT_OUT,\
.ep_interrupt_out.bmAttributes = USB_EP_TYPE_INTERRUPT,\
.ep_interrupt_out.bInterval = 1,
Definition: usb_protocol.h:194
#define UDI_VENDOR_EP_INTERRUPT_IN
Endpoint numbers used by vendor interface.
Definition: udi_vendor_conf.h:55
Standard USB endpoint descriptor structure.
Definition: usb_protocol.h:461
Definition: usb_protocol.h:252
#define UDI_VENDOR_EP_INTERRUPT_OUT
Definition: udi_vendor_conf.h:56
#define UDI_VENDOR_EPS_INT_DESC_FS
Value:
.ep_interrupt_in.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_INT_FS),\
.ep_interrupt_out.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_INT_FS),
#define LE16(x)
Definition: compiler.h:773
#define UDI_VENDOR_EPS_SIZE_INT_FS
endpoints size for full speed Note: Disable the endpoints of a type, if size equal 0 ...
Definition: conf_usb.h:117
#define UDI_VENDOR_EPS_INT_DESC_HS
Value:
.ep_interrupt_in.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_INT_HS),\
.ep_interrupt_out.wMaxPacketSize = LE16(UDI_VENDOR_EPS_SIZE_INT_HS),
#define UDI_VENDOR_EPS_SIZE_INT_HS
endpoints size for high speed
Definition: conf_usb.h:126
#define LE16(x)
Definition: compiler.h:773
#define UDI_VENDOR_EPS_ISO_DESC
#define UDI_VENDOR_EPS_ISO_DESC_FS
#define UDI_VENDOR_EPS_ISO_DESC_HS