Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Descriptors for a USB Device

composite

Data Structures

struct  udc_desc_t
 Structure for USB Device Configuration Descriptor. More...
 

Variables

COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udc_desc_t 
udc_desc_fs
 USB Device Configuration Descriptor filled for FS. More...
 
COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udc_desc_t 
udc_desc_hs
 USB Device Configuration Descriptor filled for HS. More...
 
COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE
usb_dev_desc_t 
udc_device_desc
 INDENT-OFF. More...
 
COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE
usb_dev_qual_desc_t 
udc_device_qual
 USB Device Qualifier Descriptor for HS. More...
 

UDC structures which contains all USB Device definitions

UDC_DESC_STORAGE udi_api_tudi_apis [USB_DEVICE_NB_INTERFACE]
 Associate an UDI for each USB interface. More...
 
UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs [1]
 Add UDI with USB Descriptors FS. More...
 
UDC_DESC_STORAGE udc_config_speed_t udc_config_hs [1]
 Add UDI with USB Descriptors HS. More...
 
UDC_DESC_STORAGE udc_config_t udc_config
 Add all information about USB Device in global structure for UDC. More...
 

Initial value:
= {
.confdev_lsfs = &udc_device_desc,
.conf_lsfs = udc_config_lsfs,
.confdev_hs = &udc_device_desc,
.qualifier = &udc_device_qual,
.conf_hs = udc_config_hs,
}
UDC_DESC_STORAGE udc_config_speed_t udc_config_hs[1]
Add UDI with USB Descriptors HS.
Definition: udi_composite_desc.c:155
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_qual_desc_t udc_device_qual
USB Device Qualifier Descriptor for HS.
Definition: udi_composite_desc.c:86
UDC_DESC_STORAGE udc_config_speed_t udc_config_lsfs[1]
Add UDI with USB Descriptors FS.
Definition: udi_composite_desc.c:148
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
INDENT-OFF.
Definition: udi_composite_desc.c:52

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
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udc_desc_t udc_desc_hs
USB Device Configuration Descriptor filled for HS.
Definition: udi_composite_desc.c:123
UDC_DESC_STORAGE udi_api_t * udi_apis[USB_DEVICE_NB_INTERFACE]
Associate an UDI for each USB interface.
Definition: udi_composite_desc.c:143
#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:
= {{
}}
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udc_desc_t udc_desc_fs
USB Device Configuration Descriptor filled for FS.
Definition: udi_composite_desc.c:108
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_composite_desc.c:143
#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.bLength = sizeof(usb_conf_desc_t),
.conf.bDescriptorType = USB_DT_CONFIGURATION,
.conf.wTotalLength = LE16(sizeof(udc_desc_t)),
.conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
.conf.bConfigurationValue = 1,
.conf.iConfiguration = 0,
.conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
}
Definition: usb_protocol.h:191
#define USB_DEVICE_ATTR
Definition: conf_usb.h:53
#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 UDI_COMPOSITE_DESC_FS
USB Interfaces descriptor value for Full Speed.
Definition: conf_usb.h:284
#define USB_DEVICE_POWER
Definition: conf_usb.h:52
#define LE16(x)
Definition: compiler.h:886
#define USB_DEVICE_NB_INTERFACE
Two interfaces for this device (CDC + MSC + HID mouse + HID keyboard)
Definition: conf_usb.h:106
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
Structure for USB Device Configuration Descriptor.
Definition: udi_composite_desc.c:100

USB Device Configuration Descriptor filled for FS.

Initial value:
= {
.conf.bLength = sizeof(usb_conf_desc_t),
.conf.bDescriptorType = USB_DT_CONFIGURATION,
.conf.wTotalLength = LE16(sizeof(udc_desc_t)),
.conf.bNumInterfaces = USB_DEVICE_NB_INTERFACE,
.conf.bConfigurationValue = 1,
.conf.iConfiguration = 0,
.conf.bmAttributes = USB_CONFIG_ATTR_MUST_SET | USB_DEVICE_ATTR,
}
Definition: usb_protocol.h:191
#define USB_DEVICE_ATTR
Definition: conf_usb.h:53
#define USB_CONFIG_ATTR_MUST_SET
Must always be set.
Definition: usb_protocol.h:422
#define UDI_COMPOSITE_DESC_HS
USB Interfaces descriptor value for High Speed.
Definition: conf_usb.h:293
Standard USB configuration descriptor structure.
Definition: usb_protocol.h:410
#define USB_DEVICE_POWER
Definition: conf_usb.h:52
#define LE16(x)
Definition: compiler.h:886
#define USB_DEVICE_NB_INTERFACE
Two interfaces for this device (CDC + MSC + HID mouse + HID keyboard)
Definition: conf_usb.h:106
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
Structure for USB Device Configuration Descriptor.
Definition: udi_composite_desc.c:100

USB Device Configuration Descriptor filled for HS.

Initial value:
= {
.bLength = sizeof(usb_dev_desc_t),
.bDescriptorType = USB_DT_DEVICE,
.bcdUSB = LE16(USB_V2_0),
.bDeviceClass = 0,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
.idVendor = LE16(USB_DEVICE_VENDOR_ID),
.idProduct = LE16(USB_DEVICE_PRODUCT_ID),
.bcdDevice = LE16((USB_DEVICE_MAJOR_VERSION << 8)
.iManufacturer = 1,
.iProduct = 2,
.iSerialNumber = 3,
.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:50
#define USB_DEVICE_VENDOR_ID
USB Device Configuration.
Definition: conf_usb.h:48
Definition: usb_protocol.h:190
#define USB_DEVICE_MINOR_VERSION
Definition: conf_usb.h:51
#define LE16(x)
Definition: compiler.h:886
#define USB_DEVICE_EP_CTRL_SIZE
USB Device low level configuration When only one interface is used, these configurations are defined ...
Definition: conf_usb.h:103
#define USB_DEVICE_PRODUCT_ID
Definition: conf_usb.h:49

INDENT-OFF.

USB Device Descriptor

Initial value:
= {
.bLength = sizeof(usb_dev_qual_desc_t),
.bDescriptorType = USB_DT_DEVICE_QUALIFIER,
.bcdUSB = LE16(USB_V2_0),
.bDeviceClass = 0,
.bDeviceSubClass = 0,
.bDeviceProtocol = 0,
.bMaxPacketSize0 = USB_DEVICE_EP_CTRL_SIZE,
.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
#define LE16(x)
Definition: compiler.h:886
Definition: usb_protocol.h:195
#define USB_DEVICE_EP_CTRL_SIZE
USB Device low level configuration When only one interface is used, these configurations are defined ...
Definition: conf_usb.h:103

USB Device Qualifier Descriptor for HS.

Initial value:
= {
}
#define UDI_COMPOSITE_API
USB Interface APIs.
Definition: conf_usb.h:302

Associate an UDI for each USB interface.