guoxian
驱动牛犊
驱动牛犊
  • 注册日期2001-11-22
  • 最后登录2005-11-28
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1021回复:0

pipe 的设置问题

楼主#
更多 发布于:2002-08-19 17:29
请问高手,用98DDK中何种函数,构造Endpoint1,Endpoint2的IN或OUT?     代替DS生成的如下的内容。
m_Lower.Initialize(this, Pdo);

m_Interface.Initialize(
m_Lower, //KUsbLowerDevice
0, //InterfaceNumber
1, //ConfigurationValue
0 //Initial Interface Alternate Setting
);

// Initialize each Pipe object
m_Endpoint1IN.Initialize(m_Lower, 0x81, 16);
m_Endpoint1OUT.Initialize(m_Lower, 0x1, 16);
m_Endpoint2IN.Initialize(m_Lower, 0x82, 64);
m_Endpoint2OUT.Initialize(m_Lower, 0x2, 64);

    // Inform the base class of the lower edge device object
SetLowerDevice(&m_Lower);


我如下的做法对吗?
 Interface->Pipes[1].MaximumTransferSize=16;
Interface->Pipes[1].PipeFlags = 0;
        Interface->Pipes[1].EndpointAddress = 0x01;
        Interface->Pipes[1].PipeType=UsbdPipeTypeBulk;  
        Interface->Pipes[2].MaximumTransferSize=64;
        Interface->Pipes[2].PipeFlags = 0;
Interface->Pipes[2].EndpointAddress = 0x02;
Interface->Pipes[2].PipeType=UsbdPipeTypeBulk;
        Interface->Pipes[3].MaximumTransferSize=16;
        Interface->Pipes[3].PipeFlags = 1;
Interface->Pipes[3].EndpointAddress = 0x81;
Interface->Pipes[3].PipeType=UsbdPipeTypeBulk;
        Interface->Pipes[4].MaximumTransferSize=64;
        Interface->Pipes[4].PipeFlags = 1;
Interface->Pipes[4].EndpointAddress = 0x82;
        Interface->Pipes[4].PipeType=UsbdPipeTypeBulk;
    
  UsbBuildSelectConfigurationRequest(urb,
                                          UrbSize,
                                          Descriptors);

 谢谢!我给高分!
游客

返回顶部