task0.c
来自「这个UCOS II在TI2400DSP平台上的移植源代码」· C语言 代码 · 共 33 行
C
33 行
#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 + =
减小字号Ctrl + -
显示快捷键?