main.c

来自「DM643sobel边缘检测程序」· C语言 代码 · 共 62 行

C
62
字号
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
#include <csl.h>
#include <csl_cache.h>
#include <csl_dat.h>
#include <chan.h>
#include <scom.h>
#include <utl.h>
#include "appMain.h"

extern int intHeap,extHeap;


/* perform all initializations */
void main()
{
    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);

	#define L2ALLOC3 0x0184200C
	    *(int *) L2ALLOC3 = (*(int *) L2ALLOC3) | 0x00000007;
	
	#define L2ALLOC2 0x01842008
	    *(int *) L2ALLOC2 = (*(int *) L2ALLOC2) | 0x00000007;
	
	#define L2ALLOC1 0x01842004
	    *(int *) L2ALLOC1 = (*(int *) L2ALLOC1) | 0x00000007;

    CACHE_setPriL2Req(CACHE_L2PRIHIGH);


    SCOM_init();
    // name LOG objects to be used for error/warning/general/debug messages.
    UTL_setLogs( &trace, &trace, &trace, &trace );

    tskVideoInputInit();
    tskVideoOutputInit();

    tskVideoInputStart();
    tskVideoOutputStart();
    UTL_logDebug( "Video I/O started" );


    /* create all SCOM and message objects */
    SCOM_create("INTOPROC", NULL);
    SCOM_create("PROCTOIN", NULL);
    SCOM_create("PROCTOOUT", NULL);
    SCOM_create("OUTTOPROC", NULL);

    UTL_logDebug( "Application started" );
}

⌨️ 快捷键说明

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