testostimercreate.c
来自「RTOS -REWORKS 定时器的例子」· C语言 代码 · 共 29 行
C
29 行
#include "timerTest.h"
int testOSTimerCreate()
{
OS_STATUS status;
unsigned32 t_id[10];
int i;
printf("*** test of OSTimerCreate ***\n");
for (i=0;i<10;i++)
{
status = OSTimerCreate ("TIMER" , &t_id[i]);
if (status != OS_OK)
{
printf("OSTimerCreate error:[%s]\n",serrno(errno));
return -1;
}
else
printf("Create TIMER%d OK,the ID is[%d]\n",i,t_id[i]);
}
for (i=0;i<10;i++)
OSTimerDelete (t_id[i]);
printf("*** OSTimerCreate test OK! ***\n");
return 1;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?