ch341 exam.c里的IIC_InBlockByAck函数为什么能实现产生有效应答的功能呢?里面好像没有包含发送应答的代码啊 如果确实产生了应答位,那么应答位是1还是0呢?

BOOL WINAPI IIC_InBlockByAck( // 输入数据块,每输入一个字节都产生有效应答 ULONG iIndex, // 指定CH341设备序号 ULONG iInLength, // 准备读取的数据字节数,单次必须小于32字节 PVOID oInBuffer ) // 指向一个缓冲区,返回后是读入的数据 { UCHAR mBuffer[ mCH341_PACKET_LENGTH ]; ULONG mLength, mInLen; if ( iInLength == 0 || iInLength > mCH341A_CMD_I2C_STM_MAX ) return( FALSE ); mBuffer[ 0 ] = mCH341A_CMD_I2C_STREAM; // 命令码 mBuffer[ 1 ] = (UCHAR)( mCH341A_CMD_I2C_STM_IN | iInLength ); // 输入数据,位5-位0为长度 mBuffer[ 2 ] = mCH341A_CMD_I2C_STM_END; // 当前包提前结束 mLength = 3; mInLen = 0; if ( CH341WriteRead( iIndex, mLength, mBuffer, mCH341A_CMD_I2C_STM_MAX, 1, &mInLen, mBuffer ) ) { // 执行数据流命令,先输出再输入 if ( mInLen == iInLength ) { memcpy( oInBuffer, &mBuffer[0], iInLength ); // 数据 return( TRUE ); } } return( FALSE ); }