微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

libusb_bulk_transfer是否添加CRC?

如何解决libusb_bulk_transfer是否添加CRC?

我正在使用Visual Studio 2019用C ++编写用于USB设备的用户界面程序。我正在使用libusb库。我想批量传输到设备,并且试图了解libusb_bulk_transfer的确切功能,更具体地说-它会添加CRC吗?文档中的定义:

 int libusb_bulk_transfer(struct libusb_device_handle *devh,unsigned char
 endpoint,unsigned char *data,int length,int *transferred,unsigned int
 timeout) 
 Perform an USB bulk transfer.  A timeout value of zero means no
 timeout.  The timeout value is given in milliseconds.  Returns 0 on
 success,LIBUSB_ERROR_TIMEOUT if the transfer timed out,LIBUSB_ERROR_PIPE if the control request was not supported,LIBUSB_ERROR_OVERFLOW if the device offered more data,LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a
 LIBUSB_ERROR code on other failure.

据我了解,函数libusb_bulk_transfer创建数据包并将其传输给我所需的端点,而我只需要提供数据本身即可。此功能生成数据包时会添加CRC吗?

如果没有,是否有其他方法可以进行批量传输,因此我可以控制是否添加CRC?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。