我正在尝试实现一个Xamarin.Android应用程序,它必须通过USB (FTDI chip)与光学探针通信。
我试着:
事先,非常感谢
发布于 2015-06-25 13:41:32
您可以在UsbAddressing中输入数字。现在,这是唯一的方法,如何做到这一点,并恢复的方式(我在与xamarin的支持闲聊)。我也有同样的问题,而我的工作是:
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 0, 0, 0, null, 0, 0);// reset mConnection.controlTransfer(0×40, 0, 1, 0, null, 0, 0);//clear Rx
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 0, 1, 0, null, 0, 0);// clear Rx
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 0, 2, 0, null, 0, 0);// clear Tx
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 3, 26, 0, null, 0, 0);// baudrate 57600 115200-0x001A-26, 9600-0x4138-16696, 19200-0x809C-32924, 230040-0x000D-13
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 2, 0, 0, null, 0, 0);// flow control none
UsbDeviceConnection.ControlTransfer((UsbAddressing)64, 4, 8, 0, null, 0, 0);// data bit 8, parity none, stop bit 1, tx off在我的cas中,我在十六进制0x001A和int 26中使用baudrate 115200。
如果仍然有问题,请告诉我。
https://stackoverflow.com/questions/23152615
复制相似问题