创建任务-王道考研模拟408的8套卷

qqhawk9378 10 0 pdf 2024-07-12 20:07:41

3.12 创建任务编写 app_cfg.h 用来设置任务的优先级和栈大小

  1. ifndef APP_CFG_H

  2. define APP_CFG_H

  3. /* 设置任务优先级 */
  4. define STARTUP_TASK_PRIO 4

  5. / 设置栈大小(单位为 OS_STK )/
  6. define STARTUP_TASK_STK_SIZE 80

  7. endif

编写 app.c 这个是创建 LED 显示任务

429. #include \"includes.h\"

430.

431. void Task_LED(void *p_arg)

432. {

433. (void)p_arg; // 'p_arg' 并没有用到,防止编译器提示警告

用户评论
请输入评论内容
评分:
暂无评论