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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usbconfigurationdescriptor.c

?? IAR5.2下 AT91SAM9260 ARM 對 MCP2515 控制源化碼
?? C
字號:
/* ----------------------------------------------------------------------------
 *         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.
 * ----------------------------------------------------------------------------
 */

/*
    Title: USBConfigurationDescriptor implementation

    About: Purpose
        Implementation of the USBConfigurationDescriptor class.
*/

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

#include "USBConfigurationDescriptor.h"

//------------------------------------------------------------------------------
//         Exported functions
//------------------------------------------------------------------------------
/*
    Function: USBConfigurationDescriptor_GetTotalLength
        Returns the total length of a configuration, i.e. including the 
        descriptors following it.

    Parameters:
        configuration - Pointer to a USBConfigurationDescriptor instance.

    Returns:
        Total length (in bytes) of the configuration.
*/
unsigned int USBConfigurationDescriptor_GetTotalLength(
    const USBConfigurationDescriptor *configuration)
{
    return configuration->wTotalLength;
}

/*
    Function: USBConfigurationDescriptor_GetNumInterfaces
        Returns the number of interfaces in a configuration.

    Parameters:
        configuration - Pointer to a USBConfigurationDescriptor instance.

    Returns:
        Number of interfaces in configuration.
*/
unsigned char USBConfigurationDescriptor_GetNumInterfaces(
    const USBConfigurationDescriptor *configuration)
{
    return configuration->bNumInterfaces;
}

/*
    Function: USBConfigurationDescriptor_IsSelfPowered
        Indicates if the device is self-powered when in a given configuration.

    Parameters:
        configuration - Pointer to a USBConfigurationDescriptor instance.

    Returns:
        1 if the device is self-powered when in the given configuration;
        otherwise 0.
*/
unsigned char USBConfigurationDescriptor_IsSelfPowered(
    const USBConfigurationDescriptor *configuration)
{
    if ((configuration->bmAttributes & (1 << 6)) != 0) {

        return 1;
    }
    else {

        return 0;
    }
}

/*
    Function: USBConfigurationDescriptor_Parse
        Parses the given Configuration descriptor (followed by relevant
        interface, endpoint and class-specific descriptors) into three arrays.

        *Each array must have its size equal or greater to the number of
        descriptors it stores plus one*. A null-value is inserted after the last
        descriptor of each type to indicate the array end.

        Note that if the pointer to an array is null (0), nothing is stored in
        it.

    Parameters:
        configuration - Pointer to the start of the whole Configuration descriptor.
        interfaces - Pointer to the Interface descriptor array.
        endpoints - Pointer to the Endpoint descriptor array.
        others - Pointer to the class-specific descriptor array.
*/
void USBConfigurationDescriptor_Parse(
    const USBConfigurationDescriptor *configuration,
    USBInterfaceDescriptor **interfaces,
    USBEndpointDescriptor **endpoints,
    USBGenericDescriptor **others)
{
    // Get size of configuration to parse
    int size = USBConfigurationDescriptor_GetTotalLength(configuration);
    size -= sizeof(USBConfigurationDescriptor);

    // Start parsing descriptors
    USBGenericDescriptor *descriptor = (USBGenericDescriptor *) configuration;
    while (size > 0) {

        // Get next descriptor
        descriptor = USBGenericDescriptor_GetNextDescriptor(descriptor);
        size -= USBGenericDescriptor_GetLength(descriptor);

        // Store descriptor in correponding array
        if (USBGenericDescriptor_GetType(descriptor)
             == USBGenericDescriptor_INTERFACE) {

            if (interfaces) {
            
                *interfaces = (USBInterfaceDescriptor *) descriptor;
                interfaces++;
            }
        }
        else if (USBGenericDescriptor_GetType(descriptor)
                  == USBGenericDescriptor_ENDPOINT) {

            if (endpoints) {
                
                *endpoints = (USBEndpointDescriptor *) descriptor;
                endpoints++;
            }
        }
        else if (others) {

            *others = descriptor;
            others++;
        }
    }

    // Null-terminate arrays
    if (interfaces) {

        *interfaces = 0;
    }
    if (endpoints) {

        *endpoints = 0;
    }
    if (others) {

        *others = 0;
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
三级久久三级久久久| 首页国产欧美久久| 欧美精品 日韩| 国产一区二区三区四| 亚洲免费看黄网站| 亚洲精品在线观| 欧美亚洲图片小说| 成人一二三区视频| 美国三级日本三级久久99| 亚洲色图一区二区| 久久精品一区蜜桃臀影院| 欧美日韩一区二区三区不卡| 成人av电影在线观看| 喷白浆一区二区| 亚洲福利一区二区三区| 亚洲欧洲一区二区三区| 久久在线免费观看| 欧美一区二区三区免费| 精品视频免费在线| caoporn国产精品| 久久疯狂做爰流白浆xx| 午夜视频一区在线观看| 亚洲综合色自拍一区| 中文字幕av一区二区三区免费看| 欧美一级在线免费| 欧美偷拍一区二区| 色婷婷精品大在线视频 | 亚洲欧美区自拍先锋| 久久久久国产精品人| 欧美岛国在线观看| 91精品国产91久久综合桃花| 欧美性猛交xxxx乱大交退制版| gogo大胆日本视频一区| 成人一二三区视频| 成人爱爱电影网址| 大白屁股一区二区视频| 国产a久久麻豆| 国产一区二区女| 国模娜娜一区二区三区| 久久91精品久久久久久秒播| 看电影不卡的网站| 美女网站在线免费欧美精品| 美脚の诱脚舐め脚责91| 黄色成人免费在线| 国产在线精品一区二区三区不卡| 久久国产精品99久久人人澡| 狠狠色狠狠色综合日日91app| 六月丁香婷婷久久| 国产一区二区在线电影| 国产一区二区三区四区五区美女 | 欧美日韩免费视频| 欧美探花视频资源| 欧美另类高清zo欧美| 欧美精品久久一区| 日韩精品在线网站| 国产免费观看久久| **网站欧美大片在线观看| 亚洲欧美成aⅴ人在线观看| 一区二区免费看| 婷婷亚洲久悠悠色悠在线播放| 免费的成人av| 国产成人午夜精品影院观看视频| 成人97人人超碰人人99| 日本高清无吗v一区| 欧美伊人久久久久久久久影院 | 精品久久久久香蕉网| 国产日韩欧美a| 亚洲男女毛片无遮挡| 亚洲一区二区精品视频| 琪琪一区二区三区| 粗大黑人巨茎大战欧美成人| 91网站视频在线观看| 欧美日韩国产乱码电影| 精品日韩在线观看| 亚洲欧美日韩国产另类专区| 日韩精品一二三四| 国产成人99久久亚洲综合精品| 日本乱码高清不卡字幕| 日韩一本二本av| 国产精品久久久久精k8| 亚洲成av人在线观看| 加勒比av一区二区| 日本乱码高清不卡字幕| 日韩欧美国产综合一区| 最新日韩av在线| 久久精品国产久精国产爱| 成人av一区二区三区| 欧美一区二区三区婷婷月色| 国产精品久久久久桃色tv| 亚洲r级在线视频| 成人免费的视频| 欧美一区二区三区免费大片| 亚洲另类一区二区| 国产在线一区二区| 欧美日韩三级视频| 国产精品无码永久免费888| 亚洲国产aⅴ天堂久久| 粉嫩一区二区三区性色av| 欧美日韩国产中文| 亚洲三级免费观看| 韩国成人精品a∨在线观看| 欧美主播一区二区三区美女| 国产欧美日韩另类一区| 日韩激情一二三区| 色综合婷婷久久| 久久久影视传媒| 日产国产高清一区二区三区| 91在线观看下载| 国产日产精品1区| 日韩福利电影在线| 在线中文字幕不卡| 成人欧美一区二区三区小说| 国产大片一区二区| 2023国产精品| 美腿丝袜亚洲一区| 欧美精品日韩精品| 亚洲综合在线电影| 99精品欧美一区二区三区综合在线| 亚洲精品一区二区三区蜜桃下载 | 韩国v欧美v日本v亚洲v| 欧美日韩国产一级片| 一区二区三区**美女毛片| 成人小视频免费观看| 欧美电影免费观看高清完整版在| 亚洲高清视频的网址| 91极品视觉盛宴| 一二三区精品视频| 色94色欧美sute亚洲13| 亚洲视频免费在线观看| 99久久免费精品| 国产精品久久福利| 成人av免费在线| 国产精品成人免费| www.色综合.com| 国产精品对白交换视频| 北条麻妃一区二区三区| 国产精品久久久久久久久久久免费看| 国产精品一二三四| 2023国产一二三区日本精品2022| 国产乱一区二区| 欧美精品一区二区三| 精品一区二区精品| 久久久久久97三级| 成人小视频免费在线观看| 国产精品无遮挡| 91黄色激情网站| 亚洲一区二区精品3399| 欧美日韩高清一区二区三区| 日韩不卡手机在线v区| 91麻豆精品国产综合久久久久久| 日产精品久久久久久久性色| 精品盗摄一区二区三区| 风间由美中文字幕在线看视频国产欧美| 国产精品欧美一区喷水| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲精品视频在线看| 欧美三级蜜桃2在线观看| 免费久久99精品国产| 久久久蜜桃精品| 色狠狠一区二区三区香蕉| 天堂va蜜桃一区二区三区漫画版| 日韩欧美一级精品久久| 国产精品乡下勾搭老头1| 亚洲欧美中日韩| 欧美日韩久久久一区| 久久99九九99精品| 国产精品三级视频| 欧美性猛交xxxx黑人交| 久久精品国产精品青草| 中文幕一区二区三区久久蜜桃| 91久久一区二区| 精品亚洲成a人| 亚洲欧美二区三区| 欧美成人vps| 91在线观看污| 精品一区二区日韩| 亚洲视频一二三区| 日韩一区二区精品葵司在线| av不卡一区二区三区| 免费成人小视频| 亚洲三级在线看| 日韩久久精品一区| 成年人国产精品| 五月天中文字幕一区二区| 久久九九影视网| 欧美日本一区二区三区| 国产成人av一区二区| 婷婷六月综合网| 成人欧美一区二区三区| 日韩欧美美女一区二区三区| 成人午夜电影久久影院| 日韩中文字幕区一区有砖一区 | 91精品国产综合久久香蕉的特点| 成人精品免费网站| 久久成人久久鬼色| 亚洲综合区在线| 中文成人综合网| 精品国产乱码久久久久久闺蜜| 欧洲另类一二三四区| 成人av影视在线观看|