The following structures provide the USB device descriptors required for USB Device with a single interface Vendor Class.
It is ready to use and do not require more definition.
Endpoint numbers used by vendor interface.
Note: The order of endpoint can depend on USB hardware capability when a specific mapping is used on USB DPRAM.
Referenced by udi_vendor_interrupt_in_run().
Maximum 6 endpoints used by vendor interface.
#define UDI_VENDOR_IFACE_NUMBER 0 |
Interface number is 0 because it is the unique interface.
#define USB_DEVICE_EP_CTRL_SIZE 64 |
#define USB_DEVICE_NB_INTERFACE 1 |
Only one interface for this device.
Initial value:= {
}
UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
USB Device Descriptor.
Definition: udi_vendor_desc.c:59
UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual
USB Device Qualifier Descriptor for HS.
Definition: udi_vendor_desc.c:93
UDC_DESC_STORAGE udc_config_speed_t udc_config_hs[1]
Add UDI with USB Descriptors HS.
Definition: udi_vendor_desc.c:162
UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1]
Add UDI with USB Descriptors FS.
Definition: udi_vendor_desc.c:155
Add all information about USB Device in global structure for UDC.
Global variables of USB Device Descriptor and UDI links.
Referenced by udc_req_std_dev_get_descriptor(), and udc_req_std_dev_set_configuration().
Initial value:= {{
}}
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
UDC_DESC_STORAGE udi_api_t * udi_apis[USB_DEVICE_NB_INTERFACE]
Associate an UDI for each USB interface.
Definition: udi_vendor_desc.c:150
UDC_DESC_STORAGE udc_desc_t udc_desc_hs
USB Device Configuration Descriptor filled for HS.
Definition: udi_vendor_desc.c:130
#define UDC_DESC_STORAGE
Defines the memory's location of USB descriptors.
Definition: udc_desc.h:70
Add UDI with USB Descriptors HS.
Initial value:= {{
}}
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
UDC_DESC_STORAGE udc_desc_t udc_desc_fs
USB Device Configuration Descriptor filled for FS.
Definition: udi_vendor_desc.c:115
UDC_DESC_STORAGE udi_api_t * udi_apis[USB_DEVICE_NB_INTERFACE]
Associate an UDI for each USB interface.
Definition: udi_vendor_desc.c:150
#define UDC_DESC_STORAGE
Defines the memory's location of USB descriptors.
Definition: udc_desc.h:70
Add UDI with USB Descriptors FS.
Initial value:= {
.conf.bConfigurationValue = 1,
.conf.iConfiguration = 0,
}
Definition: usb_protocol.h:191
#define USB_DEVICE_ATTR
Definition: conf_usb.h:54
#define USB_CONFIG_ATTR_MUST_SET
Must always be set.
Definition: usb_protocol.h:422
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
#define USB_DEVICE_POWER
Definition: conf_usb.h:53
#define UDI_VENDOR_DESC_FS
Content of vendor interface descriptor for full speed only.
Definition: udi_vendor.h:234
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
#define USB_DEVICE_NB_INTERFACE
Only one interface for this device.
Definition: udi_vendor_desc.c:55
#define LE16(x)
Definition: compiler.h:773
Structure for USB Device Configuration Descriptor.
Definition: udi_vendor_desc.c:107
USB Device Configuration Descriptor filled for FS.
Initial value:= {
.conf.bConfigurationValue = 1,
.conf.iConfiguration = 0,
}
Definition: usb_protocol.h:191
#define USB_DEVICE_ATTR
Definition: conf_usb.h:54
#define USB_CONFIG_ATTR_MUST_SET
Must always be set.
Definition: usb_protocol.h:422
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
#define USB_DEVICE_POWER
Definition: conf_usb.h:53
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
#define USB_DEVICE_NB_INTERFACE
Only one interface for this device.
Definition: udi_vendor_desc.c:55
#define LE16(x)
Definition: compiler.h:773
Structure for USB Device Configuration Descriptor.
Definition: udi_vendor_desc.c:107
#define UDI_VENDOR_DESC_HS
Content of vendor interface descriptor for high speed only.
Definition: udi_vendor.h:242
USB Device Configuration Descriptor filled for HS.
Initial value:= {
.bDeviceClass = 0,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.iManufacturer = 1,
.iProduct = 2,
.iSerialNumber = 0,
.bNumConfigurations = 1
}
#define USB_V2_0
Value for field bcdUSB.
Definition: usb_protocol.h:56
Standard USB device descriptor structure.
Definition: usb_protocol.h:313
#define USB_DEVICE_MAJOR_VERSION
Definition: conf_usb.h:51
#define USB_DEVICE_VENDOR_ID
USB Device Configuration.
Definition: conf_usb.h:49
Definition: usb_protocol.h:190
#define USB_DEVICE_MINOR_VERSION
Definition: conf_usb.h:52
#define LE16(x)
Definition: compiler.h:773
#define USB_DEVICE_PRODUCT_ID
Definition: conf_usb.h:50
#define USB_DEVICE_EP_CTRL_SIZE
Control endpoint size.
Definition: udi_vendor_conf.h:49
USB Device Descriptor.
Initial value:= {
.bDeviceClass = 0,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.bNumConfigurations = 1
}
#define USB_V2_0
Value for field bcdUSB.
Definition: usb_protocol.h:56
Standard USB device qualifier descriptor structure.
Definition: usb_protocol.h:338
Definition: usb_protocol.h:195
#define LE16(x)
Definition: compiler.h:773
#define USB_DEVICE_EP_CTRL_SIZE
Control endpoint size.
Definition: udi_vendor_conf.h:49
USB Device Qualifier Descriptor for HS.
Initial value:= {
}
UDC_DESC_STORAGE udi_api_t udi_api_vendor
Global structure which contains standard UDI API for UDC.
Definition: udi_vendor.c:67
Associate an UDI for each USB interface.