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

📄 usrappinit.c

📁 基于如何开发MPC860处理器系统的核心业务模块QMC的开发程序
💻 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.
*/ 

/******************************************************************************
*
* usrAppInit - initialize the users application
*/ 
#include "taskLib.h"
#include "msgQLib.h"

MSG_Q_ID snd,rev;

void msgSnd(void);
void msgRev(void);

void usrAppInit (void)
    {
	int i,j;
	char *conn;
	int len;	
	
	j=0;

#ifdef	USER_APPL_INIT
	USER_APPL_INIT;		/* for backwards compatibility */
#endif

	DS2154_Init();

	sysHdlcHwInit();

	for(;;){
		sprintf(conn,"xxxx Channel 1 is connecting!!%d",j++);
		len = strlen(conn); 
		sendMsgQMC(1,len,conn);	
for(i=0;i<10000;i++);
		sprintf(conn,"HDLC Channel 4 is connecting!!%d",j++);
		len = strlen(conn); 
		sendMsgQMC(4,len,conn);	
	}

/*
snd = msgQCreate(50,64,0x00);
rev = msgQCreate(50,64,0x00);*/
taskSpawn("send",230,0x08,4096,(FUNCPTR)msgSnd,0,0,0,0,0,0,0,0,0,0);
/*taskSpawn("receive",200,0x08,4096,(FUNCPTR)msgRev,0,0,0,0,0,0,0,0,0,0);*/
    /* add application specific code here */
    }

void msgSnd(void)
{
	char *conn;
	conn = "HDLC Channel 0 is connecting!!";
	for(;;)
	{
	sendMsgQMC(0,30,conn);
	}
}

⌨️ 快捷键说明

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