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

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

?? d12.c

?? s3c440b開發(fā)板的使用說明
?? C
?? 第 1 頁 / 共 4 頁
字號:
        // We have the configuration descriptor for the configuration
        // we want.
        //
        // Now we issue the select configuration command to get
        // the  pipes associated with this configuration.
        //

        ntStatus = D12_SelectInterface(DeviceObject,
            configurationDescriptor, NULL);

        ExFreePool(configurationDescriptor);

    }



    D12_KdPrint (("D12TEST.SYS: exit D12_ConfigureDevice (%x)\n", ntStatus));

    return ntStatus;
}


NTSTATUS
D12_SelectInterface(
    IN PDEVICE_OBJECT DeviceObject,
    IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
    PUSBD_INTERFACE_INFORMATION Interface
    )
/*++

Routine Description:

    Initializes an 82930 with multiple interfaces

Arguments:

    DeviceObject - pointer to the device object for this instance of the 82930
                    devcice.

    ConfigurationDescriptor - pointer to the USB configuration
                    descriptor containing the interface and endpoint
                    descriptors.

Return Value:

    NT status code

--*/
{
    PDEVICE_EXTENSION deviceExtension;
    NTSTATUS ntStatus;
    PURB urb = NULL;
    ULONG i;
    UCHAR alternateSetting, interfaceNumber;
    PUSB_INTERFACE_DESCRIPTOR interfaceDescriptor = NULL;
    USHORT siz;

    D12_KdPrint (("D12TEST.SYS: enter D12_SelectInterface\n"));

    deviceExtension = DeviceObject->DeviceExtension;

    if (Interface == NULL) {

        //
        // D12 driver only supports one interface, we must search
        // the configuration descriptor for the interface we want
        // and remember the pipes.
        //

        urb = USBD_CreateConfigurationRequest(ConfigurationDescriptor, &siz);

        if (urb) {

            //
            // search thru all the interfaces
            // and find any we are interested in
            //

            interfaceNumber = 0;
            alternateSetting = 0;
//            alternateSetting = 3;

            interfaceDescriptor =
                USBD_ParseConfigurationDescriptor(ConfigurationDescriptor,
                                                  interfaceNumber,
                                                  alternateSetting);

            Interface = &urb->UrbSelectConfiguration.Interface;
            
            for (i=0; i< Interface->NumberOfPipes; i++) {
                //
                // perform any pipe initialization here
                //
                Interface->Pipes[i].MaximumTransferSize = 64*1024-1;
            }

            UsbBuildSelectConfigurationRequest(urb,
                                              (USHORT) siz,
                                              ConfigurationDescriptor);

//            Interface->AlternateSetting = 3;
            
            ntStatus = D12_CallUSBD(DeviceObject, urb);

            deviceExtension->ConfigurationHandle =
                urb->UrbSelectConfiguration.ConfigurationHandle;

        } else {
            ntStatus = STATUS_INSUFFICIENT_RESOURCES;
        }

    } else {
        //
        // we were give an interface already set up
        //
        // do a selectinterface here if we want to change any of the
        // pipe parameters.
        //

        TRAP();

    }

    ASSERT(Interface != NULL);

    if (NT_SUCCESS(ntStatus)) {

        //
        // Save the configuration handle for this device
        //

        deviceExtension->ConfigurationHandle =
            urb->UrbSelectConfiguration.ConfigurationHandle;

        deviceExtension->Interface = ExAllocatePool(NonPagedPool,
                                                    Interface->Length);

        if (deviceExtension->Interface) {
            ULONG j;

            //
            // save a copy of the interface information returned
            //
            RtlCopyMemory(deviceExtension->Interface, Interface, Interface->Length);

            //
            // Dump the interface to the debugger
            //
            D12_KdPrint (("D12TEST.SYS: ---------\n"));
            D12_KdPrint (("D12TEST.SYS: NumberOfPipes 0x%x\n", deviceExtension->Interface->NumberOfPipes));
            D12_KdPrint (("D12TEST.SYS: Length 0x%x\n", deviceExtension->Interface->Length));
            D12_KdPrint (("D12TEST.SYS: Alt Setting 0x%x\n", deviceExtension->Interface->AlternateSetting));
            D12_KdPrint (("D12TEST.SYS: Interface Number 0x%x\n", deviceExtension->Interface->InterfaceNumber));
            D12_KdPrint (("D12TEST.SYS: Class, subclass, protocol 0x%x 0x%x 0x%x\n",
                deviceExtension->Interface->Class,
                deviceExtension->Interface->SubClass,
                deviceExtension->Interface->Protocol));

            // Dump the pipe info

            for (j=0; j<Interface->NumberOfPipes; j++) {
                PUSBD_PIPE_INFORMATION pipeInformation;

                pipeInformation = &deviceExtension->Interface->Pipes[j];

                D12_KdPrint (("D12TEST.SYS: ---------\n"));
                D12_KdPrint (("D12TEST.SYS: PipeType 0x%x\n", pipeInformation->PipeType));
                D12_KdPrint (("D12TEST.SYS: EndpointAddress 0x%x\n", pipeInformation->EndpointAddress));
                D12_KdPrint (("D12TEST.SYS: MaxPacketSize 0x%x\n", pipeInformation->MaximumPacketSize));
                D12_KdPrint (("D12TEST.SYS: Interval 0x%x\n", pipeInformation->Interval));
                D12_KdPrint (("D12TEST.SYS: Handle 0x%x\n", pipeInformation->PipeHandle));
                D12_KdPrint (("D12TEST.SYS: MaximumTransferSize 0x%x\n", pipeInformation->MaximumTransferSize));
            }

            D12_KdPrint (("D12TEST.SYS: ---------\n"));
        }
    }

    if (urb) {
        ExFreePool(urb);
        urb = NULL;
    }

    // Retrieve the selected Configuration and Interface setting from the
    // device.  (The only purpose of doing this here is to exercise the
    // URB_FUNCTION_GET_CONFIGURATION and URB_FUNCTION_GET_INTERFACE
    // requests).
    //
    if (NT_SUCCESS(ntStatus)) {

        urb = ExAllocatePool(
                  NonPagedPool,
                  sizeof(struct _URB_CONTROL_GET_CONFIGURATION_REQUEST) + 1);

        if (urb)
        {
            PUCHAR configuration;

            configuration = (PUCHAR)urb + sizeof(struct _URB_CONTROL_GET_CONFIGURATION_REQUEST);
            *configuration = 0xFF;

            urb->UrbHeader.Function = URB_FUNCTION_GET_CONFIGURATION;
            urb->UrbHeader.Length = sizeof(struct _URB_CONTROL_GET_CONFIGURATION_REQUEST);
            urb->UrbControlGetConfigurationRequest.TransferBufferLength = 1;
            urb->UrbControlGetConfigurationRequest.TransferBuffer = configuration;
            urb->UrbControlGetConfigurationRequest.TransferBufferMDL = NULL;
            urb->UrbControlGetConfigurationRequest.UrbLink = NULL;

            ntStatus = D12_CallUSBD(DeviceObject, urb);

            D12_KdPrint (("D12TEST.SYS: Configuration %d (%x)\n",
                             *configuration, ntStatus));

            ExFreePool(urb);
            urb = NULL;
        }

        urb = ExAllocatePool(
                  NonPagedPool,
                  sizeof(struct _URB_CONTROL_GET_INTERFACE_REQUEST) + 1);

        if (urb)
        {
            PUCHAR interface;

            interface = (PUCHAR)urb + sizeof(struct _URB_CONTROL_GET_INTERFACE_REQUEST);
            *interface = 0xFF;

            urb->UrbHeader.Function = URB_FUNCTION_GET_INTERFACE;
            urb->UrbHeader.Length = sizeof(struct _URB_CONTROL_GET_INTERFACE_REQUEST);
            urb->UrbControlGetInterfaceRequest.TransferBufferLength = 1;
            urb->UrbControlGetInterfaceRequest.TransferBuffer = interface;
            urb->UrbControlGetInterfaceRequest.TransferBufferMDL = NULL;
            urb->UrbControlGetInterfaceRequest.UrbLink = NULL;
            urb->UrbControlGetInterfaceRequest.Interface =
                deviceExtension->Interface->InterfaceNumber;

            ntStatus = D12_CallUSBD(DeviceObject, urb);

            D12_KdPrint (("D12TEST.SYS: Interface %d (%x)\n",
                             *interface, ntStatus));

            ExFreePool(urb);
            urb = NULL;
        }
    }

    D12_KdPrint (("D12TEST.SYS: exit D12_SelectInterface (%x)\n", ntStatus));

    return ntStatus;
}


NTSTATUS
D12_BuildPipeList(
    IN  PDEVICE_OBJECT DeviceObject
    )
/*++

Routine Description:

Arguments:

    DeviceObject - pointer to the device object for this instance of the 82930
                    devcice.


Return Value:

    NT status code

--*/
{
    PDEVICE_EXTENSION deviceExtension;
    ULONG i;
    WCHAR Name[] = L"\\PIPE00";
    PUSBD_INTERFACE_INFORMATION interface;

    deviceExtension = DeviceObject->DeviceExtension;
    interface = deviceExtension->Interface;

    D12_KdPrint (("D12TEST.SYS: enter D12_BuildPipeList\n"));

    deviceExtension = DeviceObject->DeviceExtension;

    for (i=0; i<D12_MAX_PIPES; i++) {

        Name[6] = 'X';
        RtlCopyMemory(deviceExtension->PipeList[i].Name,
                      Name,
                      sizeof(Name));

    }

    //
    // build a list of pipe names based on the interface
    //

    for (i=0; i<interface->NumberOfPipes; i++) {

        Name[6] = '0' + (USHORT) i;
        RtlCopyMemory(deviceExtension->PipeList[i].Name,
                      Name,
                      sizeof(Name));

        deviceExtension->PipeList[i].PipeInfo =
            &interface->Pipes[i];

        deviceExtension->PipeList[i].Opened = FALSE;
    }

    return STATUS_SUCCESS;
}


NTSTATUS
D12_ResetPipe(
    IN PDEVICE_OBJECT DeviceObject,
    IN PD12_PIPE Pipe,
    IN BOOLEAN IsoClearStall
    )
/*++

Routine Description:

    Reset a given USB pipe.
    
    NOTES:

    This will reset the host to Data0 and should also reset the device
    to Data0 for Bulk and Interrupt pipes.

    For Iso pipes this will set the virgin state of pipe so that ASAP
    transfers begin with the current bus frame instead of the next frame
    after the last transfer occurred.

Arguments:

Return Value:


--*/
{
    NTSTATUS ntStatus;
    PURB urb;

    D12_KdPrint (("D12TEST.SYS: Reset Pipe %x\n", Pipe));

    urb = ExAllocatePool(NonPagedPool,
                         sizeof(struct _URB_PIPE_REQUEST));

    if (urb) {

        urb->UrbHeader.Length = (USHORT) sizeof (struct _URB_PIPE_REQUEST);
        urb->UrbHeader.Function = URB_FUNCTION_RESET_PIPE;
        urb->UrbPipeRequest.PipeHandle =
            Pipe->PipeInfo->PipeHandle;

        ntStatus = D12_CallUSBD(DeviceObject, urb);

        ExFreePool(urb);

    } else {
        ntStatus = STATUS_INSUFFICIENT_RESOURCES;
    }

    //
    // Memphis RESET_PIPE will send a Clear-Feature Endpoint Stall to
    // reset the data toggle of non-Iso pipes as part of a RESET_PIPE
    // request.  It does not do this for Iso pipes as Iso pipes do not use
    // the data toggle (all Iso packets are Data0).  However, we also use
    // the Clear-Feature Endpoint Stall request in our device firmware to
    // reset data buffer points inside the device so we explicitly send
    // this request to the device for Iso pipes if desired.
    //
    if (NT_SUCCESS(ntStatus) && IsoClearStall &&
        (Pipe->PipeInfo->PipeType == UsbdPipeTypeIsochronous)) {
        
        urb = ExAllocatePool(NonPagedPool,
                             sizeof(struct _URB_CONTROL_FEATURE_REQUEST));

        if (urb) {

            UsbBuildFeatureRequest(urb,
                                   URB_FUNCTION_CLEAR_FEATURE_TO_ENDPOINT,
                                   USB_FEATURE_ENDPOINT_STALL,
                                   Pipe->PipeInfo->EndpointAddress,
                                   NULL);

            ntStatus = D12_CallUSBD(DeviceObject, urb);

            ExFreePool(urb);
        } else {
            ntStatus = STATUS_INSUFFICIENT_RESOURCES;
        }
    }

    return ntStatus;
}


LONG
D12_DecrementIoCount(
    IN PDEVICE_OBJECT DeviceObject
    )
/*++

Routine Description:

Arguments:

Return Value:


--*/
{
    PDEVICE_EXTENSION deviceExtension;
    LONG ioCount;

    deviceExtension = DeviceObject->DeviceExtension;

    ioCount = InterlockedDecrement(&deviceExtension->PendingIoCount);

    D12_KdPrint (("D12TEST.SYS: Pending io count = %x\n", ioCount));

    if (ioCount==0) {
        KeSetEvent(&deviceExtension->RemoveEvent,
                   1,
                   FALSE);
    }

    return ioCount;
}


VOID
D12_IncrementIoCount(
    IN PDEVICE_OBJECT DeviceObject
    )
/*++

Routine Description:

Arguments:

Return Value:


--*/
{
    PDEVICE_EXTENSION deviceExtension;

    deviceExtension = DeviceObject->DeviceExtension;

    InterlockedIncrement(&deviceExtension->PendingIoCount);
}


NTSTATUS
D12_ReconfigureDevice(
    IN  PDEVICE_OBJECT DeviceObject
    )
/*++

Routine Description:

    Initializes a given instance of the device on the USB and selects the
    configuration.

Arguments:

    DeviceObject - pointer to the device object for this instance of the 82930
                    devcice.


Return Value:

    NT status code

--*/
{
    PDEVICE_EXTENSION deviceExtension;
    NTSTATUS ntStatus = STATUS_SUCCESS;
    PUSBD_INTERFACE_INFORMATION interface;
    ULONG i;

    D12_KdPrint (("D12TEST.SYS: enter D12_ReconfigureDevice\n"));

    deviceExtension = DeviceObject->DeviceExtension;

    if (NT_SUCCESS(ntStatus)) {
        ntStatus = D12_ConfigureDevice(DeviceObject);
    }

    //
    // new interface structure is now set up
    //

    interface = deviceExtension->Interface;

    //
    // set up the pipe handles again
    //

    for (i=0; i<interface->NumberOfPipes; i++) {

        D12_KdPrint (("D12TEST.SYS: pipe list = %x\n", &deviceExtension->PipeList[i]));

        deviceExtension->PipeList[i].PipeInfo =
            &interface->Pipes[i];

        //deviceExtension->PipeList[i].Opened = FALSE;
    }

    return ntStatus;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月天精品一区二区三区| 国产欧美久久久精品影院| 夜夜爽夜夜爽精品视频| 91视频在线观看| 樱桃国产成人精品视频| 欧美日韩一二区| 免播放器亚洲一区| 久久久亚洲精品石原莉奈| 国产精品一区二区在线播放| 国产精品久久久久aaaa樱花| 日本精品免费观看高清观看| 亚洲高清在线精品| 日韩免费观看2025年上映的电影| 国产一区二区毛片| 中文字幕在线不卡一区二区三区| 在线欧美日韩精品| 六月丁香婷婷色狠狠久久| 国产欧美日韩亚州综合| 在线免费观看视频一区| 免费成人美女在线观看| 欧美国产视频在线| 欧美日韩一区二区在线视频| 久久99最新地址| 亚洲女人的天堂| 欧美www视频| 91小视频免费观看| 久热成人在线视频| 亚洲欧美另类小说视频| 精品久久久久久久久久久久久久久久久 | 成人动漫一区二区在线| 亚洲欧美偷拍三级| 日韩精品一区在线| 91麻豆精东视频| 狠狠色狠狠色综合系列| 亚洲综合成人在线视频| 久久久不卡影院| 在线日韩国产精品| 夫妻av一区二区| 日韩电影网1区2区| 亚洲精品一卡二卡| 久久午夜国产精品| 欧美日韩国产综合一区二区| 成人91在线观看| 久久99精品国产麻豆不卡| 亚洲免费在线视频一区 二区| 精品国产人成亚洲区| 欧洲在线/亚洲| 不卡视频在线看| 国产精品综合二区| 日韩国产一区二| 一区二区三区欧美日韩| 中文文精品字幕一区二区| 日韩欧美国产wwwww| 欧美亚州韩日在线看免费版国语版| 国产成人av自拍| 蜜臀久久99精品久久久久久9| 一区二区三区日韩欧美| 国产精品国产三级国产aⅴ原创 | 国产亚洲一区二区三区| 欧美一级片在线观看| 欧美日韩国产成人在线免费| 93久久精品日日躁夜夜躁欧美| 国产成人亚洲综合a∨婷婷| 蜜桃一区二区三区在线观看| 亚洲成av人片一区二区三区| 一区二区理论电影在线观看| 日韩毛片视频在线看| 国产精品日韩精品欧美在线| 久久久亚洲精品一区二区三区| 日韩亚洲欧美中文三级| 欧美一级免费大片| 欧美绝品在线观看成人午夜影视| 精品国产乱码久久久久久老虎 | 欧美天天综合网| 在线精品亚洲一区二区不卡| 色综合视频在线观看| 99热这里都是精品| www.色综合.com| 99re热视频精品| 91麻豆免费在线观看| 日本久久精品电影| 欧美日韩一区二区在线观看| 欧美巨大另类极品videosbest| 欧美日韩在线三区| 91精品国产综合久久久久久漫画| 56国语精品自产拍在线观看| 91精品国产麻豆国产自产在线| 欧美一区二区三区视频在线观看 | 蜜桃精品视频在线观看| 免费高清在线一区| 国内精品视频666| 国产传媒日韩欧美成人| 不卡电影一区二区三区| 91啪亚洲精品| 91超碰这里只有精品国产| 91精品国产综合久久久久| 337p粉嫩大胆噜噜噜噜噜91av | 婷婷综合五月天| 首页国产欧美日韩丝袜| 精品一区二区三区av| 国产精品自拍一区| 91麻豆免费在线观看| 欧美一区二区视频在线观看2020 | 亚洲一区二区三区在线| 日韩精品乱码av一区二区| 黄色资源网久久资源365| 丰满少妇久久久久久久| 欧美精品一区二区三| 久久久噜噜噜久久中文字幕色伊伊| 国产精品人成在线观看免费| 亚洲午夜视频在线观看| 久久精品国产秦先生| www.色综合.com| 欧美一区二区三区在线观看 | 欧美一区二区大片| 日本一区二区三区在线不卡| 亚洲一区二区在线免费观看视频 | 亚洲亚洲精品在线观看| 国产剧情一区在线| 91久久国产最好的精华液| 日韩一区二区在线观看| 国产精品久久久久7777按摩| 日本在线播放一区二区三区| 成人在线视频一区| 欧美日韩国产一二三| 中文一区在线播放| 日本最新不卡在线| 99精品偷自拍| 久久一区二区三区四区| 亚洲国产欧美日韩另类综合 | 国产**成人网毛片九色 | 国产无一区二区| 亚洲国产一区二区三区青草影视 | 欧美激情一区不卡| 三级在线观看一区二区| 欧美电影免费提供在线观看| 中文久久乱码一区二区| 狂野欧美性猛交blacked| 欧美综合一区二区| 国产精品嫩草影院com| 捆绑紧缚一区二区三区视频| 欧美无乱码久久久免费午夜一区| 国产色产综合产在线视频| 人人超碰91尤物精品国产| 欧美亚洲禁片免费| 国产精品久久久久久久浪潮网站| 麻豆视频观看网址久久| 欧美精品xxxxbbbb| 激情欧美一区二区三区在线观看| 欧美性大战久久| 亚洲人一二三区| www.99精品| 中文字幕精品综合| 国产成人午夜精品影院观看视频 | 久久精品av麻豆的观看方式| 欧美日韩高清一区二区不卡| 亚洲精品高清在线| 色哟哟日韩精品| ●精品国产综合乱码久久久久| 国产一区二区精品久久99| 欧美电视剧免费观看| 日本欧美肥老太交大片| 欧美午夜精品一区二区三区| 一区二区三区久久| 欧美亚洲日本国产| 亚洲电影你懂得| 欧美自拍偷拍午夜视频| 亚洲香肠在线观看| 欧美伊人久久久久久久久影院 | 欧美高清一级片在线观看| 国产电影精品久久禁18| 久久九九全国免费| 福利一区在线观看| 国产精品视频一区二区三区不卡| 成人精品小蝌蚪| 亚洲欧洲精品成人久久奇米网| 欧美美女网站色| 青娱乐精品在线视频| 精品美女在线观看| 国产精品一卡二| 国产精品欧美精品| 色94色欧美sute亚洲线路二| 亚洲一区二区三区四区五区中文| 欧美日高清视频| 黑人巨大精品欧美一区| 国产亚洲精品超碰| 91亚洲男人天堂| 五月婷婷久久综合| 精品国产一区久久| 成人午夜看片网址| 一区二区三区高清在线| 91麻豆精品久久久久蜜臀 | 老司机午夜精品| 国产精品乱子久久久久| 91黄色激情网站| 裸体健美xxxx欧美裸体表演| 久久精品一二三| 欧美手机在线视频| 狠狠网亚洲精品| 亚洲精品国产无天堂网2021|