因为项目需要所以我使用SDK2.5 提供HID的参考历程进行了修改,修改为自定义设备。设备描述符的主要信息如下:
其中主要的修改为,将端点类型修改为bulk 模式传输。
我使用Libusb 进行上位机的开发,PC端一直读,发现速度很慢,如下:
PC 一直读的时候,设备端使用for一直发送如下:
其中一直读的时候整体的速度很慢,请教一下是我设备端发送数据的方式不对吗?导致发送很慢。
HI
如你所说,我去掉printf的输出确实快很多,但是任然没有达到我预期的速度,我应该怎样做可以进一步的提高速度呢?另外请问一下我这样通过for的方式一直发是否可行,是否有更加可靠且快速的响应PC一直读的操作方法呢 ?
Hi,
Bulk传输最大包大小设置为64字节,通过while()循环应该会快一些。
Have a great day,
Mike
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi,
Please mask the printf function within the while loop and try.
Wish it helps.
Have a great day,
Mike
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------