Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USB device descriptors for a single interface

The following structures provide the USB device descriptors required for USB Device with a single interface PHDC.

It is ready to use and do not require more definition.

Data Structures

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

Macros

#define UDI_PHDC_EP_BULK_IN   (2 | USB_EP_DIR_IN)
 
#define UDI_PHDC_EP_BULK_OUT   (1 | USB_EP_DIR_OUT)
 
#define UDI_PHDC_EP_INTERRUPT_IN   (3 | USB_EP_DIR_IN)
 
#define UDI_PHDC_EP_SIZE_BULK_IN   32
 
#define UDI_PHDC_EP_SIZE_BULK_OUT   32
 
#define UDI_PHDC_EP_SIZE_INT_IN   8
 
#define UDI_PHDC_IFACE_NUMBER   0
 
#define USB_DEVICE_EP_CTRL_SIZE   32 /* 8 is not supported by PHDC */
 
#define USB_DEVICE_NB_INTERFACE   1
 

Variables

COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE udc_desc_t 
udc_desc
 
COMPILER_WORD_ALIGNED
UDC_DESC_STORAGE
usb_dev_desc_t 
udc_device_desc
 Pointer on the selected speed device configuration. More...
 

UDC structures which contains all USB Device definitions

UDC_DESC_STORAGE udi_api_tudi_apis [USB_DEVICE_NB_INTERFACE]
 
UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs [1]
 
UDC_DESC_STORAGE udc_config_t udc_config
 Global variables of USB Device Descriptor and UDI links. More...
 

UDD Configuration

#define USB_DEVICE_MAX_EP   3
 

#define UDI_PHDC_EP_SIZE_BULK_IN   32
#define UDI_PHDC_EP_SIZE_BULK_OUT   32
#define UDI_PHDC_EP_SIZE_INT_IN   8
#define UDI_PHDC_IFACE_NUMBER   0
#define USB_DEVICE_EP_CTRL_SIZE   32 /* 8 is not supported by PHDC */
#define USB_DEVICE_MAX_EP   3
#define USB_DEVICE_NB_INTERFACE   1

Initial value:
= {
.confdev_lsfs = &udc_device_desc,
.conf_lsfs = udc_config_fshs,
}
UDC_DESC_STORAGE udc_config_speed_t udc_config_fshs[1]
Definition: udi_phdc_desc.c:133
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
INDENT-OFF.
Definition: udi_composite_desc.c:52

Global variables of USB Device Descriptor and UDI links.

Global variables of USB Device Descriptor and UDI links.

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_composite_desc.c:143
#define UDC_DESC_STORAGE
Defines the memory's location of USB descriptors.
Definition: udc_desc.h:70
COMPILER_WORD_ALIGNED UDC_DESC_STORAGE udc_desc_t udc_desc
Definition: udi_phdc_desc.c:109
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,
.udi_phdc = UDI_PHDC_DESC
}
Definition: usb_protocol.h:191
#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 LE16(x)
Definition: compiler.h:886
#define UDI_PHDC_DESC
Definition: udi_phdc.h:248
#define USB_CONFIG_MAX_POWER(ma)
Max power in mA.
Definition: usb_protocol.h:427
#define USB_DEVICE_POWER
Definition: services/usb/class/composite/device/example1/conf_usb.h:52
#define USB_DEVICE_NB_INTERFACE
Definition: udi_phdc_desc.c:53
Structure for USB Device Configuration Descriptor.
Definition: udi_composite_desc.c:100
#define USB_DEVICE_ATTR
Definition: services/usb/class/composite/device/example1/conf_usb.h:53
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 = 0,
.iProduct = 0,
.iSerialNumber = 0,
.bNumConfigurations = 1
}
#define USB_V2_0
Value for field bcdUSB.
Definition: usb_protocol.h:56
#define USB_DEVICE_MINOR_VERSION
Definition: services/usb/class/composite/device/example1/conf_usb.h:51
Standard USB device descriptor structure.
Definition: usb_protocol.h:313
Definition: usb_protocol.h:190
#define LE16(x)
Definition: compiler.h:886
#define USB_DEVICE_VENDOR_ID
USB Device Configuration.
Definition: services/usb/class/composite/device/example1/conf_usb.h:48
#define USB_DEVICE_EP_CTRL_SIZE
When a extra string descriptor must be supported other than manufacturer, product and serial string...
Definition: services/usb/class/composite/device/example1/conf_usb.h:103
#define USB_DEVICE_MAJOR_VERSION
Definition: services/usb/class/composite/device/example1/conf_usb.h:50
#define USB_DEVICE_PRODUCT_ID
Definition: services/usb/class/composite/device/example1/conf_usb.h:49

Pointer on the selected speed device configuration.

Pointer on interface descriptor used by SETUP request.

Pointer on the selected speed device configuration.

USB Device Descriptor

Initial value:
= {
}
UDC_DESC_STORAGE udi_api_t udi_api_phdc
Definition: udi_phdc.c:63