1 Star 0 Fork 1

forest_555/skyeye_rawos

forked from hehe/skyeye_rawos 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test_timer.c 877 Bytes
一键复制 编辑 原始数据 按行查看 历史
嵌入式-老费 提交于 2014-06-30 00:17 +08:00 . add all rawos files
#include <raw_api.h>
#define TEST_TASK_STK_SIZE 1024
static RAW_TASK_OBJ test_task_obj;
static PORT_STACK test_task_stack1[TEST_TASK_STK_SIZE];
static RAW_TIMER tm1;
static int count = 0;
static void timer_func(void* p_arg)
{
count ++;
count = count % 3;
if(1 == count)
__put_char("a ", 2);
else if(2 == (count %3))
__put_char("b ", 2);
else
__put_char("c ", 2);
}
static void test_task1(void * pParam)
{
raw_timer_activate(&tm1, 0);
while(1) {
;
}
}
extern int test_switch;
void test_timer()
{
if(1 == test_switch) {
return;
}
test_switch = 1;
raw_timer_create(&tm1, "timer1", timer_func, 0, 10, 10, 0);
raw_task_create(&test_task_obj, (RAW_U8 *)"task1", 0,
5, 10, test_task_stack1,
TEST_TASK_STK_SIZE , test_task1, 1);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/forest555/skyeye_rawos.git
git@gitee.com:forest555/skyeye_rawos.git
forest555
skyeye_rawos
skyeye_rawos
master

搜索帮助