先調(diào)用CH341OpenDevice(0),返回true,然后調(diào)用CH341SetStream(0,2)也返回true,再調(diào)用CH341ReadI2C(0,0xD0,0x30,data),但是輸出波形上的設備地址0?設備是OK的,我驗證過!
另外你們I2C通信接口是需要自己根據(jù)命令封裝start,stop,out,in嗎,還是直接調(diào)用CH341ReadI2C/CH341WriteI2C/CH341StreamI2C?
如果是直接使用接口CH341ReadI2C/CH341WriteI2C/CH341StreamI2C進行I2C通信,那使用
BOOL WINAPI CH341StreamI2C(ULONG iIndex,? ULONG iWriteLength,PVOIDiWriteBuffer,ULONG iReadLength, PVOID oReadBuffer );
進行多字節(jié)通行時,是把設備地址,訪問地址和輸入一起寫入iWriteBuffer還是需要額外發(fā)送設備地址和訪問地址,而這個接口只發(fā)送數(shù)據(jù)啊?