BOOL CClipboardMonitorDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon

	InitializeIncludes();
	InitializeMonitor();

	return TRUE;  // return TRUE  unless you set the focus to a control
}
Beispiel #2
0
/************************************************************************
	module		:[システムイニシャルメイン処理]
	function	:[]
	return		:[なし]
	common		:[なし]
	machine		:[SH7043]
	language	:[SHC(V.3.0C)]
	keyword		:[INI]
	date		:[1997/05/10]
	author		:[野瀬敏弘]
************************************************************************/
void InitializeSystemProcess(void)
{
	UBYTE *start_address;
	UBYTE *end_address;
#if (PRO_EXT_DMAC == ENABLE)	/* 一時的に入れる */
	UBYTE dbg_sw;
#endif
	UWORD command;
	
	/*--------------------------------------------------------------*/
	/* CS0を2ウェイトに設定し直します。                         */
	/* 内蔵ROM内でのCS0設定は、遅いフラッシュを使うことがある */
	/* かもしれないので3ウェイト設定にしておきます。               */
	/* T.Nose 1997/09/05                                            */
	/* ・CS3空間は3ウェイト設定                                 */
	/* ・CS2空間はノーウェイト設定                               */
	/* ・CS1空間は2ウェイト設定 <-3 1997/08/27                 */
	/* ・CS0空間は2ウェイト設定 <-3 1997/09/05                 */
	/* 特殊テストパターンプリントの時はCS0空間5ウェイト T.Nose  */
	/*--------------------------------------------------------------*/
	if (CheckerModeRomSw == 0x70) {
	/*	SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_5WAIT);*/
		SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + 0x0003);
	}
	else {
		/* SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_2WAIT); */
		SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_3WAIT);
	}

	/*--------------------------------------------*/
	/* SH7043 内蔵I/O初期設定            */
	/*--------------------------------------------*/
	InitializeInternalDevice();

	/* if (SYB_MaintenanceSwitch[MNT_SW_A8] & SH_PA15MD_CK) { 1997/12/24  By T.Yamaguchi */
		PFC__PACRL1 |= PACRL1_PA15MD_CK; /* SH CPU の PA15 を CK出力にする T.Nose 1997/08/28 */
	/* } */

	/*--------------------------------------------*/
	/* 外部追加割込制御ポートの初期設定           */
	/*--------------------------------------------*/
	INT_InitializeExternalInterrupt();

#if (PRO_EXT_DMAC == ENABLE)
	/*--------------------------------------------*/
	/* 外部DMAC初期設定                       */
	/*--------------------------------------------*/
	INI_ExternalDMAC();
#endif

	/*--------------------------------------------*/
	/* チェッカーモードのコピー                   */
	/*--------------------------------------------*/
	CheckerMode = CheckerModeRomSw;

	/* 念のためヒーターをOFFします */
#if (PRO_PRINT_TYPE == LED)
	outpw(MODEM2_PORT, 0);
#endif

	/*--------------------------------------------*/
	/* アナログファンクションチェッカーの時       */
	/*--------------------------------------------*/
	if (CheckerMode == 0x00) {
		/* command = inpw(0x00C20200);	 */ /** コマンド読み込み */
		command = inpw(COMMAND_PORT);	/** コマンド読み込み */
		command &= 0x00ff;
		if ((command == CHECK_MODEM_TX) 
		|| (command == CHECK_MODEM_RX) 
#if (PRO_PRINT_TYPE == LED)
 #if defined(POPLAR_B)
		|| (command == CHECK_MD9509)
 #endif
#endif
		|| (command == CHECK_SHADING)
		|| (command == CHECK_TX_OUT_1080HZ)
		|| (command == CHECK_TX_OUT_5000HZ)
		|| (command == CHECK_RS232C)) {	/* モデム送受信チェックでない、CLAAS1も追加,MD9509追加 */
			/* TX,RXテスト時はman_main()で呼ばれる */
		}
		else {
			AnalogFunctionCheckerMain();				
		}
	}

#if (PRO_EXT_DMAC == ENABLE)	/* 一時的に入れる */
	/*--------------------------------------------*/
	/* デバッグ用にSRAMをクリアする			  */
	/*--------------------------------------------*/
	/*	SRAM書き込み、読み出し、比較	*/
	dbg_sw = 0;
	if (dbg_sw == 1) {
		start_address = (UBYTE *)(0x00400000);
		end_address = (UBYTE *)(0x0040ffff);
		for (; start_address <= end_address; start_address++) {	/** 終了アドレスまでループ */
			*start_address = 0xff;					/** テストコードの書き込み */
		}
		start_address = (UBYTE *)(0x00440000);
		end_address = (UBYTE *)(0x0044ffff);
		for (; start_address <= end_address; start_address++) {	/** 終了アドレスまでループ */
			*start_address = 0xff;					/** テストコードの書き込み */
		}
	}
#endif

	/*--------------------------------------------*/
	/** 10msタイマー割込みスタート			  */
	/*--------------------------------------------*/
	INI_Start10msTimer();

	/*--------------------------------------------*/
	/*  モニタテーブル初期化                      */
	/*--------------------------------------------*/
	InitializeMonitor();

	return;
}
/************************************************************************
	module		:[システムイニシャルメイン処理]
	function	:[]
	return		:[なし]
	common		:[なし]
	machine		:[SH7043]
	language	:[SHC(V.3.0C)]
	keyword		:[INI]
	date		:[1997/05/10]
	author		:[野瀬敏弘]
************************************************************************/
void InitializeSystemProcess(void)
{
	UBYTE *start_address;
	UBYTE *end_address;
#if (PRO_EXT_DMAC == ENABLE)	/* 一時的に入れる */
	UBYTE dbg_sw;
#endif
	UWORD command;
	
	/*--------------------------------------------------------------*/
	/* CS0を2ウェイトに設定し直します。                         */
	/* 内蔵ROM内でのCS0設定は、遅いフラッシュを使うことがある */
	/* かもしれないので3ウェイト設定にしておきます。               */
	/* T.Nose 1997/09/05                                            */
	/* ・CS3空間は3ウェイト設定                                 */
	/* ・CS2空間はノーウェイト設定                               */
	/* ・CS1空間は2ウェイト設定 <-3 1997/08/27                 */
	/* ・CS0空間は2ウェイト設定 <-3 1997/09/05                 */
	/* 特殊テストパターンプリントの時はCS0空間5ウェイト T.Nose  */
	/*--------------------------------------------------------------*/
#if !defined(POPLAR_H)
	if (CheckerModeRomSw == 0x70) {
	/*	SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_5WAIT);*/
		SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + 0x0003);
	}
	else {
		/* SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_2WAIT); */
		SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_3WAIT);
	}
#else
	SH__WCR1 = (WCR1_CS3_3WAIT + WCR1_CS2_NO_WAIT + WCR1_CS1_2WAIT + WCR1_CS0_2WAIT);
#endif

	/*--------------------------------------------------------------*/
	/* DCR(DRAMエリアコントロールレジスタ)の設定し直し     */
	/* ・RAS−CAS遅延サイクル数2サイクル                     */
	/*--------------------------------------------------------------*/
	SH__DCR |= DCR_RAS_DELAY_2CYCLE;

#if (PRO_PANEL == KANJI)				/* 漢字対応操作パネル */
	/* POPLAR_Hは漢字LCDのLCD_BUSYがこのポートに入っているので、
	** Busyがくれば、Waitするように設定する。
	** By O.Kimoto 1997/09/24
	*/
	PFC__PACRH |= PACRH_PA17MD_WAIT;	/**  PA17はWAIT             */
#endif

#if (PRO_EX_CLASS1 == ENABLE)	/* S.Fukui Jul.9,1998 */
	/* 拡張ROMが未接続でRS232C基板のみ接続のとき呼ばれるべきINT_MPSC()が拡張ROM側にあるので
    ** 拡張ROMがない場合(CL1_IsExClass1ROM == FALSE)はINT_MPSC()をCALLしない事とする 
    */
	CL1_IsExClass1ROM = FALSE;
#endif

	/*--------------------------------------------*/
	/* SH7043 内蔵I/O初期設定            */
	/*--------------------------------------------*/
	InitializeInternalDevice();

	/* if (SYB_MaintenanceSwitch[MNT_SW_A8] & SH_PA15MD_CK) { 1997/12/24  By T.Yamaguchi */
		PFC__PACRL1 |= PACRL1_PA15MD_CK; /* SH CPU の PA15 を CK出力にする T.Nose 1997/08/28 */
	/* } */

	/*--------------------------------------------*/
	/* 外部追加割込制御ポートの初期設定           */
	/*--------------------------------------------*/
	INT_InitializeExternalInterrupt();

#if (PRO_EXT_DMAC == ENABLE)
	/*--------------------------------------------*/
	/* 外部DMAC初期設定                       */
	/*--------------------------------------------*/
	INI_ExternalDMAC();
#endif

#if !defined(POPLAR_H)
	/*--------------------------------------------*/
	/* チェッカーモードのコピー                   */
	/*--------------------------------------------*/
	CheckerMode = CheckerModeRomSw;
#endif

	/* 念のためヒーターをOFFします */
#if (PRO_PRINT_TYPE == LED)
	outpw(MODEM2_PORT, 0);
#endif

	/*--------------------------------------------*/
	/* アナログファンクションチェッカーの時       */
	/*--------------------------------------------*/
#if defined(POPLAR_B) || defined(POPLR_BN) || defined(POPLAR_L)	/* Add By O.Kimoto 1998/03/09 */
	if (CheckerMode == 0x00) {
		/* command = inpw(0x00C20200);	 */ /** コマンド読み込み */
		command = inpw(COMMAND_PORT);	/** コマンド読み込み */
		command &= 0x00ff;
		if ((command == CHECK_MODEM_TX) 
		|| (command == CHECK_MODEM_RX) 
#if (PRO_PRINT_TYPE == LED)
 #if defined(POPLAR_B) || defined(POPLR_BN)
		|| (command == CHECK_MD9509)
 #endif
#endif
		|| (command == CHECK_SHADING)
		|| (command == CHECK_TX_OUT_1080HZ)
		|| (command == CHECK_TX_OUT_5000HZ)
		|| (command == CHECK_RS232C)) {	/* モデム送受信チェックでない、CLAAS1も追加,MD9509追加 */
			/* TX,RXテスト時はman_main()で呼ばれる */
		}
		else {
			AnalogFunctionCheckerMain();				
		}
	}
#endif
#if (PRO_EXT_DMAC == ENABLE)	/* 一時的に入れる */
	/*--------------------------------------------*/
	/* デバッグ用にSRAMをクリアする			  */
	/*--------------------------------------------*/
	/*	SRAM書き込み、読み出し、比較	*/
	dbg_sw = 0;
	if (dbg_sw == 1) {
		start_address = (UBYTE *)(0x00400000);
		end_address = (UBYTE *)(0x0040ffff);
		for (; start_address <= end_address; start_address++) {	/** 終了アドレスまでループ */
			*start_address = 0xff;					/** テストコードの書き込み */
		}
		start_address = (UBYTE *)(0x00440000);
		end_address = (UBYTE *)(0x0044ffff);
		for (; start_address <= end_address; start_address++) {	/** 終了アドレスまでループ */
			*start_address = 0xff;					/** テストコードの書き込み */
		}
	}
#endif

	/*--------------------------------------------*/
	/** 10msタイマー割込みスタート			  */
	/*--------------------------------------------*/
	INI_Start10msTimer();

	/*--------------------------------------------*/
	/*  モニタテーブル初期化                      */
	/*--------------------------------------------*/
	InitializeMonitor();

	return;
}