📄 mpeg2_loopback_main.c
字号:
#include <csl.h>
#include <csl_dat.h>
#include <csl_cache.h>
#include <chan.h>
#include <scom.h>
#include <utl.h>
#include "appMain.h"
/*-------------------------------------------------------*/
/* perform all initializations */
/*-------------------------------------------------------*/
void main()
{
int i;
int status;
CSL_init();
CACHE_clean(CACHE_L2ALL, 0, 0);
CACHE_setL2Mode(CACHE_64KCACHE);
CACHE_enableCaching(CACHE_EMIFA_CE00);
CACHE_enableCaching(CACHE_EMIFA_CE01);
DAT_open(DAT_CHAANY, DAT_PRI_LOW, DAT_OPEN_2D);
CACHE_setPriL2Req(CACHE_L2PRIHIGH);
#define L2ALLOC3 0x0184200C
*(int *) L2ALLOC3 = (*(int *) L2ALLOC3) | 0x00000007;
#define L2ALLOC2 0x01842008
*(int *) L2ALLOC2 = (*(int *) L2ALLOC2) | 0x00000007;
#define L2ALLOC1 0x01842004
*(int *) L2ALLOC1 = (*(int *) L2ALLOC1) | 0x00000007;
UTL_setLogs( &logTrace, &logTrace, &logTrace, &logTrace );
/*-------------------------------------------------------*/
/*Initialize RF5 modules */
/*-------------------------------------------------------*/
CHAN_init();
ICC_init();
SCOM_init();
/*-------------------------------------------------------*/
/*Setup the RF-5 chan module */
/*-------------------------------------------------------*/
CHAN_setup( intHeap, extHeap, intHeap, 1, NULL, NULL);
/*-------------------------------------------------------*/
/*Initialize and start the input task */
/*-------------------------------------------------------*/
tskVideoInputInit();
tskVideoOutputInit();
EVMDM642_rset(0x10, 0x20);
EVMDM642_rset(0x10, 0x08);
while(!(EVMDM642_rget(0x13)& 0x40));
/*-------------------------------------------------------*/
/*Initialize and start the Input task */
/*-------------------------------------------------------*/
tskVideoInputStart();
tskVideoOutputStart();
/*-------------------------------------------------------*/
/*Initialize and start the process task */
/*-------------------------------------------------------*/
tskProcessInit();
tskProcessStart();
/*-------------------------------------------------------*/
/* create all SCOM and message objects */
/*-------------------------------------------------------*/
for(i = 0; i<NUM_SCOM_OBJS_IN; i++) {//:#define NUM_SCOM_OBJS_IN 1
objSCOMInToProc[i][0] = SCOM_create("INTOPROC", NULL);
}
for(i = 0; i<NUM_SCOM_OBJS_OUT; i++) {//#define NUM_SCOM_OBJS_OUT 1
objSCOMProcToOut[i][0] = SCOM_create("PROCTOOUT", NULL);
objSCOMProcToOut[i][1] = SCOM_create("OUTTOIN", NULL);
}
/* create all SCOM and message objects */
//SCOM_create("INTOPROC", NULL);
//SCOM_create("PROCTOIN", NULL);
//SCOM_create("PROCTOOUT", NULL);
//SCOM_create("OUTTOPROC", NULL);
//SCOM_create("PROCTONET", NULL);
//SCOM_create("NETTOPROC", NULL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -