代码拉取完成,页面将自动刷新
同步操作将从 hehe/skyeye_rawos 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#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);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。