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

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

?? cdcdserialdriverdescriptors.c

?? AT91SAM9263的USB Device端口驅動
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ----------------------------------------------------------------------------
 *         ATMEL Microcontroller Software Support  -  ROUSSET  -
 * ----------------------------------------------------------------------------
 * Copyright (c) 2006, 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 disclaiimer below.
 * 
 * - Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the disclaimer below in the documentation and/or
 * other materials provided with the distribution. 
 * 
 * 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,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av中文字幕不卡| 国产精品99久| 精品国产一区二区三区av性色| 国产一区二区三区精品视频| 夜夜操天天操亚洲| 国产精品三级av| 日韩免费在线观看| 欧美色图免费看| 福利一区福利二区| 麻豆精品一二三| 亚洲午夜激情网站| ...av二区三区久久精品| 2024国产精品| 日韩精品一区二区三区在线播放| 一本到高清视频免费精品| 国产一区二区三区高清播放| 日韩av中文在线观看| 亚洲国产成人高清精品| ㊣最新国产の精品bt伙计久久| 久久久国际精品| 精品少妇一区二区三区在线播放| 欧美日韩专区在线| 99热精品国产| av不卡免费电影| 成人视屏免费看| 懂色av一区二区三区免费看| 国内精品久久久久影院色| 美女网站色91| 石原莉奈一区二区三区在线观看| 亚洲综合一区在线| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品嫩草久久久久| 亚洲国产高清在线| 国产女主播视频一区二区| 精品久久久久一区| 欧美精品一区二区三区蜜桃视频| 日韩欧美专区在线| 日韩一卡二卡三卡国产欧美| 91精品国产全国免费观看 | 国产成人av网站| 精品一区二区免费在线观看| 国内精品伊人久久久久av影院 | 久久综合国产精品| 久久综合中文字幕| 2020国产成人综合网| 国产欧美一区二区三区在线看蜜臀| 久久精品欧美一区二区三区麻豆| 国产清纯美女被跳蛋高潮一区二区久久w | 日韩欧美国产小视频| 日韩精品一区二区三区老鸭窝 | 日韩视频在线你懂得| 日韩精品一区二区三区在线播放| 精品日韩一区二区三区免费视频| 精品日韩一区二区三区| 国产亲近乱来精品视频| 国产精品乱码一区二三区小蝌蚪| 国产精品久久久久天堂| 亚洲欧美日本在线| 五月激情综合网| 激情丁香综合五月| 成人精品视频一区| 色狠狠桃花综合| 欧美日韩免费一区二区三区视频| 欧美精品在线观看播放| 2020国产精品| |精品福利一区二区三区| 亚洲一区中文在线| 麻豆精品国产传媒mv男同| 国产剧情一区二区| 成人av影院在线| 欧美女孩性生活视频| 欧美tickle裸体挠脚心vk| 国产精品美女久久久久久| 亚洲国产另类av| 狠狠色综合日日| 色哟哟一区二区| 日韩三级.com| 亚洲乱码精品一二三四区日韩在线| 亚洲福利一区二区| 国产成人精品一区二| 欧美午夜精品一区| 久久婷婷国产综合国色天香| 亚洲三级理论片| 蜜臀a∨国产成人精品| 国产成人综合视频| 欧美三日本三级三级在线播放| 欧美精品一区二区三区高清aⅴ | 日本国产一区二区| 久久这里只有精品6| 一区二区三区不卡视频| 国产一区二区三区久久久 | 久久精品噜噜噜成人av农村| 成人免费电影视频| 欧美一区二区三区电影| 国产精品不卡视频| 久久99精品国产91久久来源| 91亚洲国产成人精品一区二三| 欧美一级片在线观看| 国产精品久久久久aaaa樱花| 麻豆精品在线观看| 欧美性感一区二区三区| 日本一区二区三区电影| 日韩中文字幕1| bt欧美亚洲午夜电影天堂| 精品国产一区二区三区忘忧草 | 福利视频网站一区二区三区| 在线播放视频一区| 亚洲三级久久久| 粉嫩av一区二区三区| 日韩亚洲欧美综合| 午夜欧美2019年伦理| av电影天堂一区二区在线观看| 日韩欧美高清dvd碟片| 亚洲va欧美va国产va天堂影院| 91香蕉国产在线观看软件| 久久久久久久久97黄色工厂| 日本欧美在线观看| 欧美剧情片在线观看| 一区二区三区在线视频免费观看| 成人免费毛片片v| 国产亚洲一区二区三区四区 | 欧美视频在线一区| 亚洲人成7777| voyeur盗摄精品| 欧美韩国日本不卡| 国产精品1区2区3区| 欧美v国产在线一区二区三区| 日韩电影网1区2区| 678五月天丁香亚洲综合网| 亚洲第一成人在线| 欧美优质美女网站| 亚洲国产视频直播| 欧美午夜免费电影| 五月天中文字幕一区二区| 91传媒视频在线播放| 一区二区三区在线视频观看| 日本高清无吗v一区| 亚洲激情自拍偷拍| 欧美私模裸体表演在线观看| 亚洲愉拍自拍另类高清精品| 在线观看日韩毛片| 午夜精品影院在线观看| 欧美丰满嫩嫩电影| 日韩精品欧美精品| 日韩天堂在线观看| 国产一区二区导航在线播放| 国产偷v国产偷v亚洲高清| 成人免费毛片片v| 亚洲欧美日韩在线播放| 欧洲生活片亚洲生活在线观看| 一区二区三区欧美激情| 欧美人牲a欧美精品| 青青草国产精品97视觉盛宴| 精品国产一区二区三区久久影院| 国产伦精品一区二区三区在线观看| 欧美精品一区二区蜜臀亚洲| 懂色av一区二区夜夜嗨| 亚洲欧美aⅴ...| 欧美日韩专区在线| 紧缚捆绑精品一区二区| 国产精品人妖ts系列视频 | 国产欧美精品一区二区色综合| av亚洲精华国产精华精华| 亚洲激情五月婷婷| 91精品国产麻豆国产自产在线| 国产精品一级在线| 一区二区三区日韩精品视频| 欧美夫妻性生活| 高清不卡一区二区在线| 亚洲综合精品自拍| 精品国产乱码久久| 99久久国产免费看| 午夜激情综合网| 国产日韩欧美高清| 欧美日韩国产精品自在自线| 韩国欧美一区二区| 亚洲乱码一区二区三区在线观看| 91精品国产高清一区二区三区| 国产999精品久久| 亚洲国产欧美另类丝袜| 久久新电视剧免费观看| 一本大道久久a久久精品综合| 日韩 欧美一区二区三区| 中文av字幕一区| 3atv在线一区二区三区| 国产高清在线观看免费不卡| 亚洲成av人片在www色猫咪| 国产婷婷色一区二区三区四区 | 国产精品你懂的| 日韩一区二区三区免费看| 91视频在线观看免费| 韩国精品在线观看| 亚洲国产一区二区视频| 亚洲国产高清在线| 日韩免费一区二区| 欧美性大战xxxxx久久久| 成人免费三级在线| 国内精品久久久久影院一蜜桃| 亚洲超碰97人人做人人爱| 国产精品成人午夜|