⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testostimerdelete.c

📁 RTOS -REWORKS 定时器的例子
💻 C
字号:
#include "timerTest.h"

int testOSTimerDelete()
{
    OS_STATUS status;
    unsigned32 t_id[10];
 	int i = 0;
 	
 	printf("*** test of OSTimerDelete ***\n");
 	printf("create 10 timers\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;
    	}
  	}
  	
  	for (i = 0; i < 10; i++)
 	{
    	status =  OSTimerDelete  (t_id[i]); 
    	if (status != OS_OK)
    	{
    		printf("OSTimerDelete error:[%s]\n",serrno(errno));
    		return -1;
    	}
    	else
    		printf("TIMER[%d] deleted success\n",t_id[i]);
  	}
	
  	printf("*** OSTimerDelete test OK! ***\n");
    return 1;
}    


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -