请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TM4C123GH6PM Thread 中讨论的其他器件:SYSBIOS
工具/软件:TI-RTOS
大家好、
我将 TI-RTOS 用于 Tiva C、CCS7、编译器16.9.x、XDC 3.2.1.22。
我需要在程序中保存日期和时间。 我使用以下代码:
在.cfg 文件中、我添加了:
VAR 秒= xdc.useModule('ti.sysbios.hal.Seconds');
在您的应用程序.c 代码中、包括:
#include
#include
我添加以下代码:
time_t ts; //设置从 epoch 开始的当前时间(以秒为单位)*/ seconds_set (1432145807); ts = time (NULL); System_printf ("%s"、ctime (&ts));
My problem is that the
time
doesn
't update, It seems the function ti_sysbios_hal_Seconds_get() using by time() doesn'
t give the
new
seconds.
Can someone give me some advises to solve
this
problem ?
Thanks in advance,
Cheers,
Pierre Gogendeau