jpegmain.c
上传用户:dahaojd
上传日期:2008-01-29
资源大小:14357k
文件大小:2k
- #include <csl.h>
- #include <csl_cache.h>
- #include <csl_dat.h>
- #include <chan.h>
- #include <scom.h>
- #include <utl.h>
- #include "appMain.h"
- #include "appThreads.h"
- #include "appBiosObjects.h"
- extern int intHeap,extHeap;
- /* perform all initializations */
- void main()
- {
- // Turn on the cache first
- CSL_init();
- CACHE_clean(CACHE_L2ALL, 0, 0);
- CACHE_setL2Mode(CACHE_128KCACHE);
- CACHE_enableCaching(CACHE_EMIFA_CE00);
- CACHE_enableCaching(CACHE_EMIFA_CE01);
-
- DAT_open(DAT_CHAANY, DAT_PRI_LOW, DAT_OPEN_2D);
- CACHE_setL2Queue(0x3, 0x7);
- CACHE_setL2Queue(0x1, 0x7);
- CACHE_setPriL2Req(CACHE_L2PRIHIGH);
- /* Initialize ACPY, DMAN */
- ACPY2_6X1X_init();
- DMAN_init();
- DMAN_setup(intHeap);
- /* initialize RF5 modules */
- CHAN_init();
- ICC_init();
- SCOM_init();
- /* setup chan module Ratna - Modified */
- CHAN_setup( intHeap, extHeap, intHeap, SCRBUCKETS, NULL, NULL);
- // name LOG objects to be used for error/warning/general/debug messages.
- UTL_setLogs( &trace, &trace, &trace, &trace );
- tskVideoInputInit();
- tskVideoOutputInit();
- /* EVMDM642_rset(0x10, 0x20);
- EVMDM642_rset(0x10, 0x08);
- while(!(EVMDM642_rget(0x13) & 0x40));
- */ /*change*/
- tskVideoInputStart();
- tskVideoOutputStart();
- UTL_logDebug( "Video I/O started" );
- tskProcessInit();
- tskProcessStart();
- UTL_logDebug( "Process thread started" );
- thrControlInit();
- thrControlStartup();
- UTL_logDebug( "Control thread started" );
- /* 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);
- UTL_logDebug( "Application started" );
- // show heap usage, now that all threads are initialized and started
- UTL_showHeapUsage( intHeap );
- UTL_showHeapUsage( extHeap );
- }