阅读:1940回复:4
IOCTL代码中BULK传输为什么不能运行?但控制传输可以,代码如下:
if (bOpenDriver(&hDevice,m_strDeviceName))
{ // build VENDOR_OR_CLASS_REQUEST_CONTROL structure vendreq.direction = 0; // host to device vendreq.requestType = 2; // vendor request vendreq.recepient = 0; // recipient is device vendreq.requestTypeReservedBits = 0; // not used vendreq.request = 0xB8; // request value = 0xB2 vendreq.value = 0; // not used vendreq.index = 0; // not used // write to HPIA register bResult = DeviceIoControl(hDevice, // device handle IOCTL_EZUSB_VENDOR_OR_CLASS_REQUEST, // dwIoControlCode &vendreq, // ptr to vend req struct sizeof(VENDOR_OR_CLASS_REQUEST_CONTROL), // input buffer size &Read_addr, // data to send sizeof(Read_addr), // size of output buffer &nBytes, // required dummy var NULL); btc.pipeNum = 6; // EP6In is pipe 6 bResult = DeviceIoControl (hDevice, IOCTL_EZUSB_BULK_READ, &btc, sizeof (BULK_TRANSFER_CONTROL), In_Buffer, Read_length, (unsigned long *)&nBytes, NULL); |
|
沙发#
发布于:2005-05-10 11:17
难道做BULK传输还需要一些其他动作?
|
|
板凳#
发布于:2005-06-10 17:45
“btc.pipeNum = 6; // EP6In is pipe 6”
错误! EP6是pipe2 |
|
地板#
发布于:2005-06-13 08:14
多谢,早已搞好。程序下载,BULK传输都可以,但有时需要传两次,怎么才能复位端点?
|
|
地下室#
发布于:2008-08-14 10:02
IOCTL代码中控制传输的dwIoControlCode为VENDOR_OR_CLASS_REQUEST_CONTROL?另外想和几位开发过USB的朋友交流下这个读USB设备中的问题,楼上的朋友怎么和你们联系?能否提供下联系方式,qige729@163.com
|
|
|