亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cdcdserialdriverdescriptors.c

?? IAR5.2下 AT91SAM9260 ARM 對 MCP2515 控制源化碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ----------------------------------------------------------------------------
 *         ATMEL Microcontroller Software Support 
 * ----------------------------------------------------------------------------
 * Copyright (c) 2008, Atmel Corporation
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the disclaimer below.
 *
 * Atmel's name may not be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ----------------------------------------------------------------------------
 */

//------------------------------------------------------------------------------
//         Headers
//------------------------------------------------------------------------------

#include "CDCDSerialDriverDescriptors.h"
#include <board.h>
#include <usb/common/core/USBGenericDescriptor.h>
#include <usb/common/core/USBConfigurationDescriptor.h>
#include <usb/common/core/USBEndpointDescriptor.h>
#include <usb/common/core/USBStringDescriptor.h>
#include <usb/common/core/USBGenericRequest.h>
#include <usb/common/cdc/CDCGenericDescriptor.h>
#include <usb/common/cdc/CDCDeviceDescriptor.h>
#include <usb/common/cdc/CDCCommunicationInterfaceDescriptor.h>
#include <usb/common/cdc/CDCDataInterfaceDescriptor.h>
#include <usb/common/cdc/CDCHeaderDescriptor.h>
#include <usb/common/cdc/CDCCallManagementDescriptor.h>
#include <usb/common/cdc/CDCAbstractControlManagementDescriptor.h>
#include <usb/common/cdc/CDCUnionDescriptor.h>

//------------------------------------------------------------------------------
//         Definitions
//------------------------------------------------------------------------------

/// Device product ID.
#define CDCDSerialDriverDescriptors_PRODUCTID       0x6119

/// Device vendor ID (Atmel).
#define CDCDSerialDriverDescriptors_VENDORID        0x03EB

/// Device release number.
#define CDCDSerialDriverDescriptors_RELEASE         0x0100

//------------------------------------------------------------------------------
//         Macros
//------------------------------------------------------------------------------

/// Returns the minimum between two values.
#define MIN(a, b)       ((a < b) ? a : b)

//------------------------------------------------------------------------------
//         Internal structures
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
/// Configuration descriptor list for a device implementing a CDC serial driver.
//------------------------------------------------------------------------------
typedef struct {

    /// Standard configuration descriptor.
    USBConfigurationDescriptor configuration;
    /// Communication interface descriptor.
    USBInterfaceDescriptor  communication;
    /// CDC header functional descriptor.
    CDCHeaderDescriptor header;
    /// CDC call management functional descriptor.
    CDCCallManagementDescriptor callManagement;
    /// CDC abstract control management functional descriptor.
    CDCAbstractControlManagementDescriptor abstractControlManagement;
    /// CDC union functional descriptor (with one slave interface).
    CDCUnionDescriptor union1;
    /// Notification endpoint descriptor.
    USBEndpointDescriptor notification;
    /// Data interface descriptor.
    USBInterfaceDescriptor data;
    /// Data OUT endpoint descriptor.
    USBEndpointDescriptor dataOut;
    /// Data IN endpoint descriptor.
    USBEndpointDescriptor dataIn;

} __attribute__ ((packed)) CDCDSerialDriverConfigurationDescriptors;

//------------------------------------------------------------------------------
//         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,
    BOARD_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
};

#if defined(BOARD_USB_UDPHS)

/// USB device qualifier descriptor.
const USBDeviceQualifierDescriptor qualifierDescriptor = {

    sizeof(USBDeviceQualifierDescriptor),
    USBGenericDescriptor_DEVICEQUALIFIER,
    USBDeviceDescriptor_USB2_00,
    CDCDeviceDescriptor_CLASS,
    CDCDeviceDescriptor_SUBCLASS,
    CDCDeviceDescriptor_PROTOCOL,
    BOARD_USB_ENDPOINTS_MAXPACKETSIZE(0),
    1, // Device has one possible configuration
    0 // Reserved
};

#endif

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

    // Standard configuration descriptor
    {
        sizeof(USBConfigurationDescriptor),
        USBGenericDescriptor_CONFIGURATION,
        sizeof(CDCDSerialDriverConfigurationDescriptors),
        2, // There are two interfaces in this configuration
        1, // This is configuration #1
        0, // No string descriptor for this configuration
        BOARD_USB_BMATTRIBUTES,
        USBConfigurationDescriptor_POWER(100)
    },
    // Communication class interface standard descriptor
    {
        sizeof(USBInterfaceDescriptor),
        USBGenericDescriptor_INTERFACE,
        0, // This is interface #0
        0, // This is alternate setting #0 for this interface
        1, // This interface uses 1 endpoint
        CDCCommunicationInterfaceDescriptor_CLASS,
        CDCCommunicationInterfaceDescriptor_ABSTRACTCONTROLMODEL,
        CDCCommunicationInterfaceDescriptor_NOPROTOCOL,
        0  // No string descriptor for this interface
    },
    // Class-specific header functional descriptor
    {
        sizeof(CDCHeaderDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_HEADER,
        CDCGenericDescriptor_CDC1_10
    },
    // Class-specific call management functional descriptor
    {
        sizeof(CDCCallManagementDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_CALLMANAGEMENT,
        CDCCallManagementDescriptor_SELFCALLMANAGEMENT,
        0 // No associated data interface
    },
    // Class-specific abstract control management functional descriptor
    {
        sizeof(CDCAbstractControlManagementDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_ABSTRACTCONTROLMANAGEMENT,
        CDCAbstractControlManagementDescriptor_LINE
    },
    // Class-specific union functional descriptor with one slave interface
    {
        sizeof(CDCUnionDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_UNION,
        0, // Number of master interface is #0
        1 // First slave interface is #1
    },
    // Notification endpoint standard descriptor
    {
        sizeof(USBEndpointDescriptor), 
        USBGenericDescriptor_ENDPOINT,
        USBEndpointDescriptor_ADDRESS(USBEndpointDescriptor_IN,
                                      CDCDSerialDriverDescriptors_NOTIFICATION),
        USBEndpointDescriptor_INTERRUPT,
        MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_NOTIFICATION),
            USBEndpointDescriptor_MAXINTERRUPTSIZE_FS),
        10 // Endpoint is polled every 10ms
    },
    // Data class interface standard descriptor
    {
        sizeof(USBInterfaceDescriptor),
        USBGenericDescriptor_INTERFACE,
        1, // This is interface #1
        0, // This is alternate setting #0 for this interface
        2, // This interface uses 2 endpoints
        CDCDataInterfaceDescriptor_CLASS,
        CDCDataInterfaceDescriptor_SUBCLASS,
        CDCDataInterfaceDescriptor_NOPROTOCOL,
        0  // No string descriptor for this interface
    },
    // Bulk-OUT endpoint standard descriptor
    {
        sizeof(USBEndpointDescriptor), 
        USBGenericDescriptor_ENDPOINT,
        USBEndpointDescriptor_ADDRESS(USBEndpointDescriptor_OUT,
                                      CDCDSerialDriverDescriptors_DATAOUT),
        USBEndpointDescriptor_BULK,
        MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAOUT),
            USBEndpointDescriptor_MAXBULKSIZE_FS),
        0 // Must be 0 for full-speed bulk endpoints
    },
    // Bulk-IN endpoint descriptor
    {
        sizeof(USBEndpointDescriptor),
        USBGenericDescriptor_ENDPOINT,
        USBEndpointDescriptor_ADDRESS(USBEndpointDescriptor_IN,
                                      CDCDSerialDriverDescriptors_DATAIN),
        USBEndpointDescriptor_BULK,
        MIN(BOARD_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAIN),
            USBEndpointDescriptor_MAXBULKSIZE_FS),
        0 // Must be 0 for full-speed bulk endpoints
    },
};

// Language ID string descriptor
const unsigned char languageIdStringDescriptor[] = {

    USBStringDescriptor_LENGTH(1),
    USBGenericDescriptor_STRING,
    USBStringDescriptor_ENGLISH_US
};

#if defined(BOARD_USB_UDPHS)
/// Other-speed configuration descriptor (when in full-speed).
const CDCDSerialDriverConfigurationDescriptors otherSpeedDescriptorsFS = {

    // Standard configuration descriptor
    {
        sizeof(USBConfigurationDescriptor),
        USBGenericDescriptor_OTHERSPEEDCONFIGURATION,
        sizeof(CDCDSerialDriverConfigurationDescriptors),
        2, // There are two interfaces in this configuration
        1, // This is configuration #1
        0, // No string descriptor for this configuration
        BOARD_USB_BMATTRIBUTES,
        USBConfigurationDescriptor_POWER(100)
    },
    // Communication class interface standard descriptor
    {
        sizeof(USBInterfaceDescriptor),
        USBGenericDescriptor_INTERFACE,
        0, // This is interface #0
        0, // This is alternate setting #0 for this interface
        1, // This interface uses 1 endpoint
        CDCCommunicationInterfaceDescriptor_CLASS,
        CDCCommunicationInterfaceDescriptor_ABSTRACTCONTROLMODEL,
        CDCCommunicationInterfaceDescriptor_NOPROTOCOL,
        0  // No string descriptor for this interface
    },
    // Class-specific header functional descriptor
    {
        sizeof(CDCHeaderDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_HEADER,
        CDCGenericDescriptor_CDC1_10
    },
    // Class-specific call management functional descriptor
    {
        sizeof(CDCCallManagementDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_CALLMANAGEMENT,
        CDCCallManagementDescriptor_SELFCALLMANAGEMENT,
        0 // No associated data interface
    },
    // Class-specific abstract control management functional descriptor
    {
        sizeof(CDCAbstractControlManagementDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_ABSTRACTCONTROLMANAGEMENT,
        CDCAbstractControlManagementDescriptor_LINE
    },
    // Class-specific union functional descriptor with one slave interface
    {
        sizeof(CDCUnionDescriptor),
        CDCGenericDescriptor_INTERFACE,
        CDCGenericDescriptor_UNION,
        0, // Number of master interface is #0
        1 // First slave interface is #1

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区中文字幕电影| 国产999精品久久| 精品一区二区三区香蕉蜜桃| 国产一区91精品张津瑜| youjizz久久| 欧美蜜桃一区二区三区| 精品国产1区二区| 亚洲人成伊人成综合网小说| 日本一不卡视频| 国产白丝精品91爽爽久久| 91伊人久久大香线蕉| 日韩亚洲国产中文字幕欧美| 中文字幕一区二区三区视频| 日产国产高清一区二区三区| 成人精品小蝌蚪| 欧美一级久久久久久久大片| 久久精品视频在线免费观看| 国产精品一区二区你懂的| av网站免费线看精品| 欧美精品三级日韩久久| 国产精品狼人久久影院观看方式| 亚洲在线观看免费视频| 国内欧美视频一区二区| 欧美性受xxxx| 国产精品午夜久久| 免费观看久久久4p| 欧洲一区在线观看| 国产色产综合色产在线视频| 午夜精品国产更新| 成人爱爱电影网址| 日韩欧美区一区二| 亚洲成av人影院| gogogo免费视频观看亚洲一| 精品国产乱码久久久久久浪潮 | 久久国产精品露脸对白| 91视频.com| 日本一区二区视频在线| 免费成人在线网站| 欧美丝袜自拍制服另类| 欧美一区永久视频免费观看| 亚洲精品国久久99热| 中文字幕精品一区二区精品绿巨人| 蜜臀国产一区二区三区在线播放| 制服丝袜成人动漫| 欧美一区日韩一区| 亚洲免费观看高清完整版在线 | 久久久精品免费观看| 午夜电影网亚洲视频| 色综合天天综合网国产成人综合天 | 在线看国产一区| 亚洲欧洲性图库| 成人高清在线视频| 国产免费久久精品| 国产精品主播直播| www激情久久| 久久66热偷产精品| 88在线观看91蜜桃国自产| 亚洲成人动漫精品| 欧美在线三级电影| 一区二区三区成人在线视频| 色综合天天综合色综合av| 亚洲欧洲成人精品av97| 成人av资源下载| 国产精品麻豆欧美日韩ww| 国产精品性做久久久久久| 日韩免费高清av| 久久精品av麻豆的观看方式| 日韩一区二区三区免费观看 | 99久久er热在这里只有精品66| 久久综合久久99| 精品夜夜嗨av一区二区三区| 日韩一区二区不卡| 另类小说图片综合网| 欧美一级欧美三级在线观看| 免费在线欧美视频| 亚洲精品一区二区三区四区高清| 免费日本视频一区| 日韩欧美一二三| 国产做a爰片久久毛片| 国产视频一区二区在线| 懂色一区二区三区免费观看 | 色婷婷激情一区二区三区| 欧美写真视频网站| 一区二区三区高清在线| 欧美三级午夜理伦三级中视频| 亚洲福利视频一区| 欧美乱熟臀69xxxxxx| 久久精品国产亚洲aⅴ| 精品久久久久香蕉网| 国产成人综合在线观看| 欧美国产1区2区| 色综合久久久久久久久久久| 亚洲国产精品人人做人人爽| 欧美精品久久一区二区三区| 麻豆精品一区二区综合av| 久久精子c满五个校花| youjizz久久| 图片区小说区国产精品视频| 日韩一区二区三区精品视频| 国产91丝袜在线播放| 亚洲欧美日韩人成在线播放| 91麻豆精品国产91久久久使用方法 | 国产一区二区精品久久99| 国产女人aaa级久久久级| 色综合天天综合色综合av| 日韩高清在线一区| 国产亚洲精品福利| 欧美综合一区二区三区| 日本不卡123| 亚洲精品一区二区三区蜜桃下载| 成人99免费视频| 国产精品国产自产拍在线| 欧美日免费三级在线| 国产精品一区二区久久不卡| 综合色中文字幕| 欧美一激情一区二区三区| 国产精品一二二区| 亚洲影院免费观看| 久久先锋影音av鲁色资源| 色播五月激情综合网| 奇米影视在线99精品| 《视频一区视频二区| 91精品国产手机| 色综合久久久久综合| 久久国产精品无码网站| 亚洲欧洲成人精品av97| 日韩欧美精品三级| 99re这里只有精品首页| 久久www免费人成看片高清| 樱花影视一区二区| 久久综合中文字幕| 欧美人成免费网站| 成人午夜视频在线| 久久99蜜桃精品| 亚洲曰韩产成在线| 中文字幕av资源一区| 日韩视频一区在线观看| 欧美午夜免费电影| 波多野结衣欧美| 国产一区二区美女诱惑| 一区二区欧美在线观看| 欧美激情自拍偷拍| 日韩精品一区二| 欧美色综合网站| 成人不卡免费av| 黑人巨大精品欧美一区| 丝袜亚洲精品中文字幕一区| 亚洲男人的天堂网| 国产嫩草影院久久久久| 亚洲精品一区二区三区99| 欧美日韩国产美| 色94色欧美sute亚洲线路一ni| 国产不卡视频在线观看| 狠狠色丁香婷婷综合| 日韩国产欧美在线视频| 亚洲电影你懂得| 亚洲视频在线观看三级| 国产欧美日韩在线观看| 国产suv一区二区三区88区| 亚洲一区二区三区四区中文字幕| 国产精品久久久久久久久动漫 | 亚洲一区二区三区自拍| 日韩二区三区四区| 亚洲第一精品在线| 亚洲精品国产a| 国产精品精品国产色婷婷| 中文字幕欧美日韩一区| 精品欧美黑人一区二区三区| 日韩免费观看高清完整版| 欧美日韩日日摸| 精品视频一区二区三区免费| 97成人超碰视| 色琪琪一区二区三区亚洲区| 99久久精品一区二区| 北条麻妃国产九九精品视频| 成人精品gif动图一区| 国产精品一区二区视频| 国内一区二区视频| 色呦呦国产精品| 亚洲一区在线电影| 欧美午夜寂寞影院| 亚洲国产成人av网| 日韩一区二区免费视频| 天天综合色天天综合色h| 欧美日本韩国一区二区三区视频| 亚洲欧美成人一区二区三区| 日本丶国产丶欧美色综合| 亚洲男人天堂一区| 欧美日韩精品一区二区天天拍小说 | 色狠狠桃花综合| 丝袜美腿亚洲综合| 亚洲精品在线观| 91一区二区三区在线观看| 亚洲一二三区不卡| 久久久久久亚洲综合影院红桃| 色综合久久六月婷婷中文字幕| 亚洲图片欧美视频| 成人免费在线播放视频| 91精品国产综合久久久久久| 欧美日韩视频在线一区二区|