创建任务-王道考研模拟408的8套卷
3.12创建任务
编写app_cfg.h
用来设置任务的优先级和栈大小
#ifndef __APP_CFG_H__
#define __APP_CFG_H__
/****设置任务优先级****/
#define STARTUP_TASK_PRIO 4
/***设置栈大小(单位为OS_STK )***/
#define STARTUP_TASK_STK_SIZE 80
#endif
编写app.c
这个是创建LED显示任务
#include \"includes.h\"
void Task_LED(void *p_arg)
{
(void)p_arg; // 'p_arg'并没有用到,防止编译器提示警告
}
下载地址
用户评论