示例#1
0
#define MIN(a, b)       ((a < b) ? a : b)

/*------------------------------------------------------------------------------
 *         Exported variables
 *----------------------------------------------------------------------------*/

/** Device descriptor for a USB Audio Speakerphone driver. */
const USBDeviceDescriptor deviceDescriptor = {

	sizeof(USBDeviceDescriptor),
	USBGenericDescriptor_DEVICE,
	USBDeviceDescriptor_USB2_00,
	0xEF,/* MI */
	0x02,
	0x01,
	CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
	CDCAUDDDriverDescriptors_VENDORID,
	CDCAUDDDriverDescriptors_PRODUCTID,
	CDCAUDDDriverDescriptors_RELEASE,
	1, /* Manufacturer string descriptor index */
	2, /* Product string descriptor index */
	3, /* Index of serial number string descriptor */
	1  /* One possible configuration */
};

/** Device qualifier descriptor (Necessary to pass USB test). */
static const USBDeviceQualifierDescriptor qualifierDescriptor = {

	sizeof(USBDeviceQualifierDescriptor),
	USBGenericDescriptor_DEVICEQUALIFIER,
	USBDeviceDescriptor_USB2_00,
 *------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------
 *         Internal variables
 *------------------------------------------------------------------------------*/

/** Device descriptor. */
static const USBDeviceDescriptor deviceDescriptor = {

    sizeof(USBDeviceDescriptor),
    USBGenericDescriptor_DEVICE,
    USBDeviceDescriptor_USB2_00,
    HIDDeviceDescriptor_CLASS,
    HIDDeviceDescriptor_SUBCLASS,
    HIDDeviceDescriptor_PROTOCOL,
    CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
    HIDDTransferDriverDescriptors_VENDORID,
    HIDDTransferDriverDescriptors_PRODUCTID,
    HIDDTransferDriverDescriptors_RELEASE,
    1, /* Index of manufacturer description */
    2, /* Index of product description */
    3, /* Index of serial number description */
    1  /* One possible configuration */
};

/** Configuration descriptor. */
static const HIDDTransferDriverConfigurationDescriptors configurationDescriptors = {

    /* Configuration descriptor */

    {
示例#3
0
#define MIN(a, b)       ((a < b) ? a : b)

/*------------------------------------------------------------------------------
 *         Exported variables
 *------------------------------------------------------------------------------*/

/** Standard USB device descriptor for the CDC serial driver */
const USBDeviceDescriptor deviceDescriptor = {

    sizeof(USBDeviceDescriptor),
    USBGenericDescriptor_DEVICE,
    USBDeviceDescriptor_USB2_00,
    CDCDeviceDescriptor_CLASS,
    CDCDeviceDescriptor_SUBCLASS,
    CDCDeviceDescriptor_PROTOCOL,
    CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
    CDCDSerialDriverDescriptors_VENDORID,
    CDCDSerialDriverDescriptors_PRODUCTID,
    CDCDSerialDriverDescriptors_RELEASE,
    0, /* No string descriptor for manufacturer */
    1, /* Index of product string descriptor is #1 */
    0, /* No string descriptor for serial number */
    1 /* Device has 1 possible configuration */
};

/** Standard USB configuration descriptor for the CDC serial driver */
const CDCDSerialDriverConfigurationDescriptors configurationDescriptorsFS = {

    /* Standard configuration descriptor */
    {
        sizeof(USBConfigurationDescriptor),
示例#4
0
#include <USBDescriptors.h>
#include <VIDEODescriptors.h>
#include <USBDDriver.h>

/* ------------------- USB Video ----------------------- */
/** USB Device descriptor. */

const USBDeviceDescriptor usbDeviceDescriptor = {
	sizeof(USBDeviceDescriptor),
	USBGenericDescriptor_DEVICE,
	USBDeviceDescriptor_USB2_00,
	VIDDeviceDescriptor_CLASS,
	VIDDeviceDescriptor_SUBCLASS,
	VIDDeviceDescriptor_PROTOCOL,
	CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
	USBD_VID_ATMEL, // Atmel vendor ID
	USBD_PID_UVC, // Product ID
	USBD_RELEASE_0_01, // Product release 0.01
	0, // No manufacturer string descriptor
	0, // No product string descriptor
	0, // No serial number string descriptor
	1 // One possible configuration
};

/** Device qualifier descriptor (to pass USB test). */

static const USBDeviceQualifierDescriptor qualifierDescriptor = {

	sizeof(USBDeviceQualifierDescriptor),
	USBGenericDescriptor_DEVICEQUALIFIER,
示例#5
0
#define MIN(a, b)       ((a < b) ? a : b)

/*------------------------------------------------------------------------------
 *         Internal variables
 *----------------------------------------------------------------------------*/

/** Standard USB device descriptor for the CDCMSD device driver */
static const USBDeviceDescriptor deviceDescriptor = {

    sizeof(USBDeviceDescriptor),
    USBGenericDescriptor_DEVICE,
    USBDeviceDescriptor_USB2_00,
    0xEF, /* MI */
    0x02,
    0x01,
    CHIP_USB_ENDPOINTS_MAXPACKETSIZE(0),
    CDCMSDDDriverDescriptors_VENDORID,
    CDCMSDDDriverDescriptors_PRODUCTID,
    CDCMSDDDriverDescriptors_RELEASE,
    0, /* No string descriptor for manufacturer */
    1, /* Index of product string descriptor is #1 */
    0, /* No string descriptor for serial number */
    1  /* Device has 1 possible configuration */
};

/** USB configuration descriptors for the CDCMSD device driver */
static const CDCMSDDriverConfigurationDescriptors configurationDescriptorsFS =
{

    /* Standard configuration descriptor */
    {