有人可以帮助我将此代码更改为Python吗? [英] Can someone help me change this code to Python?

查看:69
本文介绍了有人可以帮助我将此代码更改为Python吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题已经修改.....并再次发布........



我尝试了什么:



The question has been revised.....and posted again........

What I have tried:

Can someone help me change this code to Python?

推荐答案

您不与USB端口通信。它不是一个港口。它是一个扩展总线,与主板上的插槽不同。



您可以与总线上的设备通信。设备如何将自己暴露给您的代码,这将决定您如何与它进行对话。例如,如果您的设备将自身暴露为串行端口,则使用常规串行端口方法与其通信。



哦,您的代码不做任何事情用数据填充缓冲区的其他。就是这样。



我不懂Python。
You do not talk to the USB "port". It is not a port. It is an expansion bus, not unlike the slots on your motherboard.

You talk to the devices on the bus. How the device exposes itself to your code is what is going to determine how you talk to it. For example, if your device exposes itself as a serial port, you use normal serial port methods to talk to it.

Oh, and your code doesn't do anything other that fill a buffer with data. That's it.

and I don't know Python.


这篇关于有人可以帮助我将此代码更改为Python吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆