📄 tc007_01_timer.c.svn-base
字号:
/* * File : tc001_thread.c * This file is part of RT-Thread RTOS * COPYRIGHT (C) 2006, RT-Thread Development Team * * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://openlab.rt-thread.com/license/LICENSE * * Change Logs: * Date Author Notes * 2006-06-06 Bernard the first version */#include <rtthread.h>struct rt_timer timer1;struct rt_timer timer2;void timeout1(void* parameter){ rt_kprintf("periodic timer is timeout\n");}void timeout2(void* parameter){ rt_kprintf("one shot timer is timeout\n");}int rt_application_init(){ rt_timer_init(&timer1, "timer1", timeout1, RT_NULL, 200, RT_TIMER_FLAG_PERIODIC); rt_timer_init(&timer2, "timer2", timeout2, RT_NULL, 200, RT_TIMER_FLAG_ONE_SHOT); rt_timer_start(&timer1); rt_timer_start(&timer2); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -