Ejemplo n.º 1
0
/*****************************************************************************************************************
	初始化
******************************************************************************************************************/
void MainWindow::initialize()
{
	progress		=	new Progress;						// 設定 progress  這邊順序不能隨便對調
    settings		=	new Settings( progress );
    filedata		=	new DataContainer( settings );

	pointlistInitialize();

    vectorListWidget->setData(filedata);
    process		=	new Processing(settings,filedata);

	displayInitialize();

}
Ejemplo n.º 2
0
	void InitializeSyncronous()//Synchronous version - dont place it inside task!!!!!!!!!!!!!!!1
	{
		MosiPin.FastAsOutput();
		SckPin.FastAsOutput();
		DCPin.FastAsOutput();
		ResetPin.FastAsOutput();

		ResetPin.Set();
		_delay_ms(50);
		ResetPin.Clear();
		_delay_ms(50);
		ResetPin.Set();

		//DIRxSET = CS; //


		SPI::SpiMode3();
		SPI::AsMaster();
		SPI::SPIEnable();

		displayInitialize(10,10);
	}
Ejemplo n.º 3
0
HRESULT mainInitialize(void)
{
	HRESULT		hResult = NO_ERROR;
    
#ifdef _CLI
	hResult = cliSIOInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_CLI

#if 1 //LM???
	//Setting WWUID for this device
	lalSetWWUID(DEFAULT_DEVICE_ID_HIGH, DEFAULT_DEVICE_ID_LOW);
#endif

#ifdef _SYSDEBUG
	//sysDebugSetEnabled(SYSDEBUG_TRACE_SPS | SYSDEBUG_TRACE_FIS);
#endif //_SYSDEBUG

	TCTaskingInitialize(); // Init kernel

	hResult = mainInitializeTasks();
	if (hResult != NO_ERROR) return hResult;

#ifdef _FIS
	{
		fisInitialize();  //Initialize fis early to be able to get environment settings
		hResult = envInitialize("setup"); //Initialize environment, assume settings image named "setup"
		if (hResult != NO_ERROR)
		{
			sysDebugPrintf("Could not initialize environment - will use default values\n");      
		}
		envGetEenvironmentLongDefault	("SERIAL_NO", &serialNo, MAX_PRODUCT_SERIAL);
		lalSetWWUID (GET_WWUID_HIGH, GET_WWUID_LOW(serialNo));
		//ML:171106, per default JET uses PHY clock due to ADAT pulse width on DICE JR/Mini.
		//envGetEenvironmentLongDefault	("HPLL_CLK", &hpllClk, HPLL_CLK_HZ);
		//hpllSetClock(hpllClk);
	}
#endif //_FIS
	
#ifdef _CLI
	hResult = cliInitialize();
	if (hResult != NO_ERROR) return hResult;

	hResult = cliBuiltInToolSetSplashCB(SplashCB);
	if (hResult != NO_ERROR) return hResult;

	hResult = cliBuiltInToolSetResetCB(StartBoot);
	if (hResult != NO_ERROR) return hResult;
	
#ifdef _FIS
	hResult = envCliInstallTools();
	if (hResult != NO_ERROR) return hResult;
#endif //_FIS
#endif //_CLI

#ifdef _1394CORE
	hResult = lalInitialize1394();			// create the basic 1394 protocol (lal layer and below)
	if (hResult != NO_ERROR) return hResult;
#endif //_1394CORE

#ifdef _AVS
	hResult = avsInitialize();
	if (hResult != NO_ERROR) return hResult;

//#ifdef _CLI
//	hResult = avsTestCliInstallTools();
//	if (hResult != NO_ERROR) return hResult;
//#endif // _CLI

#endif //_AVS

#ifdef _CRB
	crbInitialize();
#endif

#ifdef _IRM
	hResult = irmInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_IRM

#ifdef _CMP
	hResult = cmpInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_CMP

#ifdef _FCP
	hResult = fcpInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_FCP

#ifdef _AVC
	hResult = avcInitialize();
	if (hResult != NO_ERROR) return hResult;
#if 1 //LM???
	hResult = avcPanelInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif
#endif //_AVC

#ifdef _EDS
	hResult = edsInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_EDS

#ifdef _DRD
	hResult = drdInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_DRD

#if defined (_AVC) && defined (_EDS) && defined (_DRD)
	hResult = avcAudioInitialize();
	if (hResult != NO_ERROR) return hResult;

	hResult = avcMusicInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_AVC &&  _EDS && _DRD

#ifdef _DTCP
	hResult = dtcpInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_DTCP

#ifdef _PIONEERDVD
	hResult = pioneerDVDInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_PIONEERDVD

#ifdef _REMOTEDVD
	hResult = remoteDVDInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_REMOTEDVD

#ifdef _CLI_CB
	// How do we get rid of this, ML????
	hResult = cliCBInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_CLI

#ifdef _MLAN
	hResult = mLANInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_MLAN

#ifdef _DICE_DRIVER
	hResult = diceDriverInitialize();
	if (hResult != NO_ERROR) return hResult;	
#endif //_DICE_DRIVER

#if defined (_AVC) && defined (_EDS) && defined (_DRD)
	hResult = avcDriverInitialize();
	if (hResult != NO_ERROR) return hResult;	
#endif // (_AVC) && defined (_EDS) && defined (_DRD)

#ifdef _FRMWLOAD
	hResult = frmwLoadInitialize();
	if (hResult != NO_ERROR) return hResult;	
	frmwLoadSetResetCB(StartBoot);
	if (hResult != NO_ERROR) return hResult;	
#endif //_FRMWLOAD

#ifdef _DALREMOTE
	hResult = RDALInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_DALREMOTE

#ifdef _DICEJR
	hResult = diceInitialize();
	if (hResult != NO_ERROR) return hResult;
	hResult = dalInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_DICE2

#ifdef _MEMTEST
	hResult = memTestInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_MEMTEST

#ifdef _DSP
#ifdef _CLI
	hResult = dspCliInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif // _CLI
#endif //_DSP

#ifdef _GRAY
//	hResult = grayInitialize();	//LM??? grayInitialize called from cli command
#ifdef _CLI
	hResult = grayCliInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif // _CLI
#endif //_GRAY

#ifdef _CLI
	hResult = TCKernelCliInitialize();
	if (hResult != NO_ERROR) return hResult;
#endif //_CLI

#ifdef _I2C
	i2cInitialize();
#endif //I2C


#ifdef _DICE_TIMER2
	diceTimer2Initialize();
#endif //_DICE_TIMER2

#ifdef _AML
	amlInitialize();
#endif //_DICE_TIMER2

#ifdef _SPI
	spiInitialize();
#endif

#ifdef _EAP
	eapInitialize();
#endif

	hResult = displayInitialize();
	if (hResult != NO_ERROR) return hResult;
	
	hResult = myAppInitialize();
	if (hResult != NO_ERROR) return hResult;

	TCTaskingStart();

	return hResult;
}