主题中讨论的其他器件:C2000WARE
当检查 ti\cc2000\C2000Ware_5_01_00_00\driverlib\f28p65x\examples\C28x\i2c\ccs\的示例时
I2C_Ex5_controller_target_interrupt
i2cLib_FIFO_CONTROLLER_TARGET_INTERRUPT.c
我发现有两种不同的 发送数据样式、
第一个
I2C_sendStartCondition (base);
//等待目标地址的传输
while (!(I2C_getStatus (base)和 I2C_STS_REG_ACCESS_RDY));
//生成停止条件
I2C_sendStopCondition (base);
第二个
I2C_sendStartCondition (base);
I2C_sendStopCondition (base);
问题是、当 msater 使用 FIFO 发送地址和数据时、应等待 while (I2C_getTxFIFOStatus (I2CA_BASE)!= I2C_FIFO_TXEMPTY)、然后等待 I2C_sendStopCondition (base);
或者无关紧要、 在将数据放入 FIFO 后、可以一起发送开始和停止条件、硬件将进行处理、在发送数据后、将发送停止条件。
//设置要发送的数据
I2C_putData (I2CA_BASE、u16Cmd);
I2C_sendStartCondition (base);
I2C_sendStopCondition (base);