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.

[参考译文] EK-TM4C129EXL:非任务函数中的 I2C_TRANSFCTION API

Guru**** 1831610 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/579907/ek-tm4c129exl-i2c_transfer-api-in-non-task-function

器件型号:EK-TM4C129EXL

您好!

I2C_transfer API 位于非任务线程中。 正在从任务线程调用该 fthread。 在执行过程中、程序退出 I2C_TRANSF传输 步骤。 有人能指正确的方向吗?

无法立即发布实际代码。 但它看起来是这样的。

void TaskFxn()

i2C_read (I2C_Handle handle、uint8_t deviceAddr、uint16_t regAddr、uint8_t *数据、size_t length);

void I2C_read (I2C_Handle handle、uint8_t deviceAddr、uint16_t regAddr、uint8_t *数据、size_t length)

i2C_transfer ();

MAIN ()

Task_create (TaskFxn);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    "program Exit in I2C_transfer step"是什么意思? 您是否正在使用 TI-RTOS? 我意识到您只发布了一些基本内容、但通常情况下、您将在任务中拥有无限循环。  您是否看过一些 TI-RTOS 示例?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    尊敬的 Bob:
    感谢您的建议。 我们能够调试该问题。 现在它正在运行。