您好!
我将在项目中使用 simple_peripheral 示例。 当我尝试在代码中使用 sleep()时,它会抛出错误,表示符号未解析。 我还包括了 unistd.h。 我使用的是 tirtos 和 tirang 编译器。
看起来 Task_sleep()函数只能在任务内部使用。 但我还想在主程序中使用睡眠功能。 请就此向我提供帮助。
此致、
Madhudhan
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.
您好!
我将在项目中使用 simple_peripheral 示例。 当我尝试在代码中使用 sleep()时,它会抛出错误,表示符号未解析。 我还包括了 unistd.h。 我使用的是 tirtos 和 tirang 编译器。
看起来 Task_sleep()函数只能在任务内部使用。 但我还想在主程序中使用睡眠功能。 请就此向我提供帮助。
此致、
Madhudhan
大家好、 Madhusudhan、
明白了。 正如您提到的,Task_sleep()只能真正用于实际任务。 您是否需要器件进入低功耗状态才能进行这些初始化? 如果是、我建议参考 E2E 主题:
https://e2e.ti.com/f/1/t/760286/
https://e2e.ti.com/f/1/t/1008629/
此致、
1月