我用21434一颗主另一颗从,读数据正常,可是写不进去,为啥呢??用得就是范例的程序啊
I2CHW_bWriteBytes(SLAVE_ADDRESS, txBuffer, 32, I2CHW_CompleteXfer);
/* Wait until the data is transferred */
while(!I2CHW_bReadI2CStatus() & I2CHW_WR_COMPLETE);
/* Clear Write Complete Status bit */
I2CHW_ClrWrStatus();
I2CHW_fReadBytes(SLAVE_ADDRESS, rxBuffer, 32, I2CHW_CompleteXfer);
/* Wait until the data is read */
while(!I2CHW_bReadI2CStatus() & I2CHW_RD_COMPLETE);
/* Clear Read Complete Status bit */
I2CHW_ClrRdStatus(); |