?? usrappinit.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 + -