📄 task0.c
字号:
#include "f240_c.h"
#include "includes.h"
#include "Task0.h"
#include "TestTask.h"
static const int LED_ID[8] = {0, 1, 2, 3, 4, 5, 6, 7};
OS_STK Task0Stk[TASK0_STK_SZ];
void Task0(void *pdata)
{
int i;
/* Run the ticker */
*T2CON |= 0x0040;
*IMR |= 0x0004;
/* Initialize the statistics task */
OSStatInit();
/* Create application tasks */
for(i = 0; i < 8; i++)
OSTaskCreateExt(TestTask, (void *)&LED_ID[i], &TestTaskStk[i][0], i+4,
i+4, &TestTaskStk[i][TEST_TASK_STK_SZ-1], TEST_TASK_STK_SZ,
(void *)0, OS_TASK_OPT_STK_CHK|OS_TASK_OPT_STK_CLR);
/* Delete itself */
OSTaskDel(OS_PRIO_SELF);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -