⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_taskstart.c

📁 ucos在EP9302上的移植,运行正常,欢迎使用.
💻 C
字号:
/**************************************************************************
;                                                                         *
;   PROJECT     : ARM9 port test                                          *
;                                                                         *
;   MODULE      : OS_taskstart.c                                          *
;                                                                         *
;   AUTHOR      : wlp             		                                  *
;                 URL  :                                                  *
;                 EMAIL: samping1982@yahoo.com.cn                         *
;                                                                         *
;   PROCESSOR   : EP9302 (32 bit ARM920T RISC core from CIRRUS Logic)     *
;                                                                         *
;   IDE         : SDT 2.51 & ADS 1.2                                      *
;                                                                         *
;   DESCRIPTION : start up task in ucos                                   *
;                 												          *
;   DATE        : 2007.03.18                                              *
;                                                                         *
;*************************************************************************/
#include "includes.h"
#include "ucos_tasks.h"
#include "OS_EP9302.h"

void TaskStart(void *pdata)
{
	#if OS_CRITICAL_METHOD == 3			/* Allocate storage for CPU status register           */
    	OS_CPU_SR  cpu_sr;
	#endif
	
	pdata = pdata;	//just avoid warning
	
	
	//begin creating the application tasks
	//task1 set the beeb
	 OSTaskCreateExt(Task1,
    				(void*)0,
    				&Task1Stack[TASK1_STACKSIZE-1],
    				TASK1_PRIO,
    				TASK1_ID,
    				Task1Stack,
    				TASK1_STACKSIZE,
    				(void*)0,
    				OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
    
    //task2 clear the beeb
	OSTaskCreateExt(Task2,
    				(void*)0,
    				&Task2Stack[TASK2_STACKSIZE-1],
    				TASK2_PRIO,
    				TASK2_ID,
    				Task2Stack,
    				TASK2_STACKSIZE,
    				(void*)0,
    				OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
    
    
    OSTimeInit(OS_TICKS_PER_SEC);		//initialization and start the ticks
	
	OSTaskSuspend(OS_PRIO_SELF);		//suspend the TaskStart.
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -