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

📄 usrappinit.c

📁 vxworks bsp,s3c2410的vxworks开发资料
💻 C
字号:
/* usrAppInit.c - stub application initialization routine */

/* Copyright 1984-1998 Wind River Systems, Inc. */

/*
modification history
--------------------
01a,02jun98,ms   written
*/

/*
DESCRIPTION
Initialize user application code.
*/ 
#include "vxworks.h"
#include "s3c44b0x.h"

/*tTick任务的函数体*/
void tTick(void)
{
    /* Amine: 系统状态灯, 端口位参看第2章开发板硬件原理p4*/
    while(1){	 	
	taskDelay (sysClkRateGet()/2);	/*延时0.5s*/
	*CPLDREG2 &= ~(0x04);		/*亮*/
	taskDelay (sysClkRateGet()/2);	/*延时0.5s*/	
	*CPLDREG2 |= 0x04;		/*灭*/
    }
}

/******************************************************************************
*
* usrAppInit - initialize the users application
*/ 

void usrAppInit (void)
    {
    int tid;
#ifdef	USER_APPL_INIT
	USER_APPL_INIT;		/* for backwards compatibility */
#endif

    printf ("Attaching to /tffs0/... ");
    if (usrTffsConfig (0, 0, "/tffs0/vxworks") == ERROR)
        printf ("usrTffsConfig failed.\n");
    else
	printf ("done.\n");

    /*创建并激活tTick任务,优先级150,任务栈4096字节,无入口参数*/
    tid = taskCreat("tTick",255, 0, 4096,(FUNCPTR)tTick,0,0,0,0,0,0,0,0,0,0);
    taskActivate(tid);
    
    }


⌨️ 快捷键说明

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