请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:CC3220SF 您好!
我无法找到函数参数中使用的"系统节拍"的定义 I2C_transferTimeout(..)
。
我还想知道如何将实时秒转换为"系统节拍"。
感谢您的帮助!
Jiří
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.
您好!
我无法找到函数参数中使用的"系统节拍"的定义 I2C_transferTimeout(..)
。
我还想知道如何将实时秒转换为"系统节拍"。
感谢您的帮助!
Jiří
系统节拍周期取决于操作系统-您可以使用 ClockP_getSystemTickPeriod ()获取它(这是一个 用于 FreeRTOS、tirtos 和 NORTOS 的操作系统抽象接口)。
ClockP_getSystemTickPeriodis 的值以美国为单位(微秒)、 您可以在一秒钟内找到节拍数...
#define SL_TIMESTAMP_TICKS_IN_seconds (1000000/ClockP_getSystemTickPeriod())
然后:
#define ConvertSecToSystemTicks(秒) ((sec)*(sl_timestamp_ticks_in_seconds))