This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123 使用官方I2C例程出现问题

#20 identifier "I2C0_MASTER_BASE" is undefined

#20 identifier "I2C0_SLAVE_BASE" is undefined

请问这2个参数 在哪定义的

我在 hw_i2c.h  hw_memmap.h 都找不到应该怎么解决这个问题

IIC.rar
  • 这个是跨版本的问题了。请更新到最新的TivaWare_C_Series-2.1.0.12573然后用里面的例程就好。

    如果要基于你现在的代码去改,请参考下面连接中关于I2C的描述:

    http://www.ti.com/lit/pdf/spma050

  • tivaware中似乎只有单字节收发的例子,即SINGLE_SEND,请问ti有收发多字节的例子吗,就是BURST_SEND

  • Zhengguan,

    1. TiVA的MCU是支持burst send的。

    2. 使用什么样的发送方式,配置是基本相同的。

    3.无论是single send 还是 burst send主要是使用I2CMasterControl函数时,选择不同的参数。

    至于选择什么样的参数,请参考driverlib的user guide 以及 对应part的datasheet。