tc007_01_timer.c.svn-base

来自「RT-Thread是发展中的下一代微内核嵌入式实时操作系统」· SVN-BASE 代码 · 共 30 行

SVN-BASE
30
字号
/*
 * 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://www.rt-thread.com/license/LICENSE.
 *
 * Change Logs:
 * Date           Author       Notes
 * 2006-06-06     Bernard      the first version
 */

#include <rtthread.h>

struct rt_timer timer;
void timeout(void* parameter)
{
	rt_kprintf("timer timeout\n");
}

int rt_application_init()
{
	rt_timer_init(&timer, "timer", timeout, RT_NULL, 200, RT_TIMER_FLAG_PERIODIC);
	rt_timer_start(&timer);

	return 0;
}

⌨️ 快捷键说明

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